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