Class: Spree::Admin::OptionValuesController
- Inherits:
-
BaseController
- Object
- BaseController
- Spree::Admin::OptionValuesController
- Defined in:
- app/controllers/spree/admin/option_values_controller.rb
Instance Method Summary collapse
Instance Method Details
#update_positions ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'app/controllers/spree/admin/option_values_controller.rb', line 5 def update_positions params[:positions].each do |id, index| OptionValue.update_all(['position=?', index], ['id=?', id]) end respond_to do |format| format.html { redirect_to edit_admin_option_type_url(params[:id]) } format.js { render :text => 'Ok' } end end |