summaryrefslogtreecommitdiffstats
path: root/lib/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'lib/plugins')
-rw-r--r--lib/plugins/acts_as_list/lib/active_record/acts/list.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/plugins/acts_as_list/lib/active_record/acts/list.rb b/lib/plugins/acts_as_list/lib/active_record/acts/list.rb
index 3c1ba5216..f1887eed4 100644
--- a/lib/plugins/acts_as_list/lib/active_record/acts/list.rb
+++ b/lib/plugins/acts_as_list/lib/active_record/acts/list.rb
@@ -137,7 +137,8 @@ module ActiveRecord
def reset_positions_in_list
acts_as_list_class.where(scope_condition).reorder("#{position_column} ASC, id ASC").each_with_index do |item, i|
unless item.send(position_column) == (i + 1)
- acts_as_list_class.update_all({position_column => (i + 1)}, {:id => item.id})
+ acts_as_list_class.where({:id => item.id}).
+ update_all({position_column => (i + 1)})
end
end
end