swanandp/acts_as_list — Issue #19: Update position when scope changes
Author: chief
Created: 2011-11-04 14:24:03+00:00
State: open

In update, position remains the same when scope changes. I think that a solution should be to trigger `add_to_list_bottom` but I can't think of any global way, especially in complex scope cases. When it is just a field I use something like this

```ruby
class TodoItem < ActiveRecord::Base
belongs_to :todo_list
acts_as_list :scope => :todo_list
before_update :change_position

def change_position
add_to_list_bottom if todo_list_id_changed?
end
end
```

Is there a better way?