This project is archived and is in readonly mode.
ActiveRecord::Base#changed returns empty when attribute set during after_create
-
Matt Jones
I'm not sure that this is a bug - the possible uses seem very limited. The problem is arising from the partial update / dirty checking code in dirty.rb; the list of changed fields is cleared after a save is completed. That, combined with partial updates, means that the changes in overwrite_id_dependant don't get written out.
The short, quick solution to this is to use update_attribute rather than write_attribute; this will save the field immediately to the DB. Is there a reason why this won't work in your app, Mike?
-
Steve St. Martin
- Assigned user set to Ryan Bigg
agreed, not really a bug. author never responded should be marked as invalid or needs-more-info
