- 27 4月, 2012 3 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
- 17 1月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
This reverts commit c99d507f.
-
- 29 12月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
-
- 07 6月, 2011 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 05 6月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Refactor Active Record test connection setup. Please see the RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
-
- 18 2月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Split AssociationProxy into an Association class (and subclasses) which manages the association, and a CollectionProxy class which is *only* a proxy. Singular associations no longer have a proxy. See CHANGELOG for more.
-
- 08 1月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
-
- 05 1月, 2011 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 04 1月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Remove undocumented feature from has_one where you could pass false as the second parameter to build_assoc or create_assoc, and the existing associated object would be untouched (the foreign key would not be nullified, and it would not be deleted). If you want behaviour similar to this you can do the following things: * Use :dependent => :nullify (or don't specify :dependent) if you want to prevent the existing associated object from being deleted * Use has_many if you actually want multiple associated objects * Explicitly set the foreign key if, for some reason, you really need to have multiple objects associated with the same has_one. E.g. previous = obj.assoc obj.create_assoc previous.update_attributes(:obj_id => obj.id)
-
- 23 11月, 2010 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 17 11月, 2010 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 19 7月, 2010 1 次提交
-
-
由 Łukasz Strzałkowski 提交于
-
- 19 5月, 2010 1 次提交
-
-
由 Neeraj Singh 提交于
[#4645 state:resolved] Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
- 29 12月, 2009 1 次提交
-
-
由 Jeremy Kemper 提交于
-
- 28 12月, 2009 5 次提交
-
-
由 Murray Steele 提交于
Make polymorphic_inverse_of in Reflection throw an InverseOfAssociationNotFoundError if the supplied class doesn't have the appropriate association. [#3520 state:resolved] Signed-off-by: NEloy Duran <eloy.de.enige@gmail.com>
-
由 Murray Steele 提交于
Provide a slightly more robust we_can_set_the_inverse_on_this? method for polymorphic belongs_to associations. [#3520 state:resolved] Also add a new test for polymorphic belongs_to that test direct accessor assignment, not just .replace assignment. Signed-off-by: NEloy Duran <eloy.de.enige@gmail.com>
-
由 George Ogata 提交于
Signed-off-by: NEloy Duran <eloy.de.enige@gmail.com>
-
由 Murray Steele 提交于
Get rid of a duplicate set_inverse_instance call if you use new_record(true) (e.g. you want to replace the existing instance). Signed-off-by: NEloy Duran <eloy.de.enige@gmail.com>
-
由 George Ogata 提交于
Signed-off-by: NEloy Duran <eloy.de.enige@gmail.com>
-
- 10 5月, 2009 2 次提交
-
-
由 Frederick Cheung 提交于
Signed-off-by: NMichael Koziarski <michael@koziarski.com>
-
由 Frederick Cheung 提交于
Signed-off-by: NMichael Koziarski <michael@koziarski.com>
-
- 05 5月, 2009 1 次提交
-
-
由 Murray Steele 提交于
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: NMurray Steele <muz@h-lame.com> Signed-off-by: NJeremy Kemper <jeremy@bitsweat.net>
-