Class: Spree::Admin::PrototypesController
Instance Method Summary
collapse
belongs_to, create, #create, destroy, #destroy, #edit, #new, new_action, #update, update, #update_positions
included
#current_ability, included, #redirect_back_or_default, #store_location, #try_spree_current_user, #unauthorized
Instance Method Details
#available ⇒ Object
12
13
14
15
16
17
18
|
# File 'app/controllers/spree/admin/prototypes_controller.rb', line 12
def available
@prototypes = Prototype.order('name asc')
respond_with(@prototypes) do |format|
format.html { render :layout => !request.xhr? }
format.js
end
end
|
#select ⇒ Object
20
21
22
23
24
25
|
# File 'app/controllers/spree/admin/prototypes_controller.rb', line 20
def select
@prototype ||= Prototype.find(params[:id])
@prototype_properties = @prototype.properties
respond_with(@prototypes)
end
|
#show ⇒ Object
4
5
6
7
8
9
10
|
# File 'app/controllers/spree/admin/prototypes_controller.rb', line 4
def show
if request.xhr?
render :layout => false
else
redirect_to admin_prototypes_path
end
end
|