Class: Spree::Admin::ImagesController
- Inherits:
-
ResourceController
- Object
- ApplicationController
- BaseController
- BaseController
- ResourceController
- Spree::Admin::ImagesController
- Defined in:
- app/controllers/spree/admin/images_controller.rb
Instance Method Summary collapse
Methods inherited from ResourceController
belongs_to, create, #create, destroy, #destroy, #edit, #new, new_action, #update, update
Methods included from Core::ControllerHelpers
Instance Method Details
#update_positions ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'app/controllers/spree/admin/images_controller.rb', line 10 def update_positions params[:positions].each do |id, index| Image.where(:id => id).update_all(:position => index) end respond_to do |format| format.js { render :text => 'Ok' } end end |