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