Displaying 1 result from an estimated 1 matches for "269774be".
Did you mean:
269774
2006 Jun 05
1
Drag and drop sortable list woes
Well I have it dragging and dropping but its not saving!
def sort
@prices = Price.find(params[:id])
@prices.each do |@price|
@price.position = params[''price''].index(@price.id.to_s) + 1
@price.save
end
render :nothing => true
end
Current error in the view after dropping is -
undefined method `each'' for #<Price:0xb74ec4ac>