Permalink
Browse files

sortable 1 based as described here: http://groups.google.com/group/ac…

  • Loading branch information...
1 parent d659e07 commit 3e2660ac79aff6075b2e723f82fe079c7913026b @robd robd committed Jun 23, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/actions/sortable.rb
View
@@ -49,7 +49,7 @@ def reorder
id_list = params[active_scaffold_tbody_id].map{|i| i.gsub(/[^0-9]/, '').to_i}
id_list.each_index{|index|
- m.update_all(["#{column_name} = ?", index], ["id = ?", id_list[index]])
+ m.update_all(["#{column_name} = ?", index+1], ["id = ?", id_list[index]])
}
render :update do |page|
page << "ActiveScaffold.stripe('#{active_scaffold_tbody_id}');"

0 comments on commit 3e2660a

Please sign in to comment.