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
Methods included from SetsUserLanguageLocaleKey
Instance Method Details
#update_values_positions ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'app/controllers/spree/admin/option_types_controller.rb', line 8 def update_values_positions params[:positions].each do |id, index| Spree::OptionValue.where(id:).update_all(position: index) end respond_to do |format| format.js { head :no_content } end end |