Class: Spree::Api::ClassificationsController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- BaseController
- Spree::Api::ClassificationsController
- Defined in:
- app/controllers/spree/api/classifications_controller.rb
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
Methods inherited from BaseController
#map_nested_attributes_keys, #permitted_line_item_attributes, #set_jsonp_format
Methods included from ControllerSetup
Instance Method Details
#update ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/controllers/spree/api/classifications_controller.rb', line 4 def update :update, Product :update, Taxon classification = Spree::Classification.find_by( :product_id => params[:product_id], :taxon_id => params[:taxon_id] ) # Because position we get back is 0-indexed. # acts_as_list is 1-indexed. classification.insert_at(params[:position].to_i + 1) render :nothing => true end |