aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/man.rb
Commit message (Collapse)AuthorAgeFilesLines
* modernizes hash syntax in activerecordXavier Noria2016-08-061-7/+7
|
* applies new string literal convention in activerecord/testXavier Noria2016-08-061-5/+5
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Address ORA-00972: identifier is too long when tested with OracleYasuo Honda2014-07-141-1/+1
| | | | by using shorter attribute names.
* use name specified by 'as' for automatic inverse association to avoid ↵Andrew S. Brown2014-06-101-0/+1
| | | | reflecting on wrong association
* Fixing multi-word automatic inverse detection.wangjohn2013-08-151-0/+1
| | | | | Currently, ActiveRecord models with multiple words cannot have their inverse associations detected automatically.
* Getting rid of the +automatic_inverse_of: false+ option in associations in favorwangjohn2013-06-081-1/+1
| | | | | of using +inverse_of: false+ option. Changing the documentation and adding a CHANGELOG entry for the automatic inverse detection feature.
* Created a method to automatically find inverse associations and cachewangjohn2013-05-071-1/+1
| | | | | | the results. Added tests to check to make sure that inverse associations are automatically found when has_many, has_one, or belongs_to associations are defined.
* Add inverse polymorphic association support. [#3520 state:resolved]George Ogata2009-12-281-0/+2
| | | | Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
* Providing support for :inverse_of as an option to associations.Murray Steele2009-05-041-0/+7
You can now add an :inverse_of option to has_one, has_many and belongs_to associations. This is best described with an example: class Man < ActiveRecord::Base has_one :face, :inverse_of => :man end class Face < ActiveRecord::Base belongs_to :man, :inverse_of => :face end m = Man.first f = m.face 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. Currently :inverse_of supports has_one and has_many (but not the :through variants) associations. It also supplies inverse support for belongs_to associations where the inverse is a has_one and it's not a polymorphic. Signed-off-by: Murray Steele <muz@h-lame.com> Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>