Class: Spree::Api::ClassificationsController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- BaseController
- Spree::Api::ClassificationsController
show all
- Defined in:
- app/controllers/spree/api/classifications_controller.rb
Instance Attribute Summary
#current_api_user
Instance Method Summary
collapse
#map_nested_attributes_keys
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
authorize! :update, Product
authorize! :update, Taxon
classification = Spree::Classification.find_by(
:product_id => params[:product_id],
:taxon_id => params[:taxon_id]
)
classification.insert_at(params[:position].to_i + 1)
render :nothing => true
end
|