Class: Spree::Admin::PrototypesController
- Inherits:
-
ResourceController
- Object
- ResourceController
- Spree::Admin::PrototypesController
- Defined in:
- app/controllers/spree/admin/prototypes_controller.rb
Instance Method Summary collapse
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 |
# File 'app/controllers/spree/admin/prototypes_controller.rb', line 22 def select @prototype ||= Prototype.find(params[:id]) @prototype_properties = @prototype.properties 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 |