Greg Donald wrote:
On Tue, Feb 16, 2010 at 7:04 PM, Greg Donald gdon...@gmail.com wrote:
You can easily detect a foreign key change with a filter in the model:
Or even better:
http://www.railsapi.com/doc/rails-v2.3.5/classes/ActiveRecord/Callbacks.html
--
Greg Donald
destiney.com |
Thanks a lot Michael
I ended up doing your second suggestion, shying away from the rails
magic since i couldn't seem to really control it.
Personally it seems most natural to me for rails to work the association
magic when either the foreign key is changed or the direct association
set method
Wouldn't ActiveRecord Observer class do what you're looking for?
On Feb 16, 2010, at 1:08 AM, Max Williams wrote:
Thanks a lot Michael
I ended up doing your second suggestion, shying away from the rails
magic since i couldn't seem to really control it.
Personally it seems most natural
3 matches
Mail list logo