Class: Spree::Admin::PageImagesController

Inherits:
ResourceController
  • Object
show all
Defined in:
app/controllers/spree/admin/page_images_controller.rb

Instance Method Summary collapse

Instance Method Details

#update_positionsObject



9
10
11
12
13
14
15
16
# File 'app/controllers/spree/admin/page_images_controller.rb', line 9

def update_positions
  params[:positions].each do |id, index|
    Spree::PageImage.update_all(['position=?', index], ['id=?', id])
  end
  respond_to do |format|
    format.js  { render :text => 'Ok' }
  end
end