You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Jason, There's an option you can pass to your acts_as_list call :add_new_at => :top which should do what you're trying to do. It's not documented I don't think, but the code is here:
You're welcome :) I've found altering the current record in after_creates
is always a hassle. There always seems to be some unforeseen consequence.
Better to override the attribute setter or something like that instead (not
in this case though!).
Trying to reorder a list inside of an after_create callback doesn't seem to do any reordering. I created a little example with an rspec test in it.
https://github.com/jasonsof/acts-as-list-example
Is this normal, or am I doing something wrong here?
The text was updated successfully, but these errors were encountered: