Class: Admin::ImagesController
- Inherits:
-
ResourceController
- Object
- ResourceController
- Admin::ImagesController
- Defined in:
- app/controllers/admin/images_controller.rb
Instance Method Summary collapse
Instance Method Details
#update_positions ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'app/controllers/admin/images_controller.rb', line 8 def update_positions params[:positions].each do |id, index| Image.update_all(['position=?', index], ['id=?', id]) end respond_to do |format| format.js { render :text => 'Ok' } end end |