Class: Spree::Admin::OptionTypesController
- Inherits:
-
ResourceController
- Object
- BaseController
- BaseController
- ResourceController
- Spree::Admin::OptionTypesController
- Defined in:
- app/controllers/spree/admin/option_types_controller.rb
Instance Method Summary collapse
Methods inherited from ResourceController
belongs_to, #create, #destroy, #edit, #new, #update, #update_positions
Instance Method Details
#update_values_positions ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'app/controllers/spree/admin/option_types_controller.rb', line 6 def update_values_positions params[:positions].each do |id, index| OptionValue.where(:id => id).update_all(:position => index) end respond_to do |format| format.html { redirect_to admin_product_variants_url(params[:product_id]) } format.js { render :text => 'Ok' } end end |