Undocumented :inverse_of option for ActiveRecord associations

Posted . Visible to the public.

You can now add an :inverse_of option to has_one, has_many and belongs_to associations.... Without :inverse_of m and f.man would be different instances of the same object (f.man being pulled from the database again). With these new :inverse_of options m and f.man are the same in memory instance.

Last edit
Keywords
rails, makandra
License
Source code in this card is licensed under the MIT License.
Posted by Lexy to makandra dev (2010-10-27 08:04)