- 18 5月, 2011 1 次提交
-
-
由 Andrew White 提交于
The build_association method was added as an API for plugins to hook into in 1398db01. This commit restores this API and the ability to override class.new to return a subclass based on a virtual attribute in the attributes hash.
-
- 13 5月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Don't use mass-assignment protection when setting foreign keys or association conditions on singular associations. Fixes #481 (again).
-
- 11 5月, 2011 2 次提交
-
-
由 Andrew White 提交于
-
由 Jon Leighton 提交于
-
- 13 4月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Deprecated support for passing hashes and relations to default_scope, in favour of defining a 'default_scope' class method in the model. See the CHANGELOG for more details.
-
- 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.
-
- 14 2月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Add interpolation of association conditions back in, in the form of proc { ... } rather than instance_eval-ing strings
-
- 30 1月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
We shouldn't be using scoped.scoping { ... } to build associated records, as this can affect validations/callbacks/etc inside the record itself [#6252 state:resolved]
-
- 12 1月, 2011 5 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
When assigning a has_one, if the existing record fails to be removed from the association, raise an error
-
由 Jon Leighton 提交于
has_one should always remove the old record (properly), even if not saving the new record, so we don't get the database into a pickle
-
- 08 1月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Construct an actual ActiveRecord::Relation object for the association scope, rather than a hash which is passed to apply_finder_options. This allows more flexibility in how the scope is created, for example because scope.where(a, b) and scope.where(a).where(b) mean different things.
-
- 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 提交于
-
- 09 11月, 2010 1 次提交
-
-
由 David Chelimsky 提交于
- persisted? is the API defined in ActiveModel - makes it easier for extension libraries to conform to ActiveModel APIs without concern for whether the extended object is specifically ActiveRecord [#5927 state:committed] Signed-off-by: NSantiago Pastorino <santiago@wyeworks.com>
-
- 29 9月, 2010 1 次提交
-
-
由 Marcelo Giorgi 提交于
Signed-off-by: NSantiago Pastorino <santiago@wyeworks.com>
-
- 17 8月, 2010 1 次提交
-
-
由 Xavier Noria 提交于
code gardening: we have assert_(nil|blank|present), more concise, with better default failure messages - let's use them
-
- 19 5月, 2010 1 次提交
-
-
由 Neeraj Singh 提交于
[#4645 state:resolved] Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
- 28 3月, 2010 1 次提交
-
-
由 Rizwan Reza 提交于
-
- 16 3月, 2010 1 次提交
-
-
由 Aaron Patterson 提交于
Signed-off-by: Nwycats <wycats@gmail.com>
-
- 09 3月, 2010 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
- 02 1月, 2010 1 次提交
-
-
由 Pratik Naik 提交于
Remove the test which was testing a non-existing method, always failing on 1.9 and never even running on 1.8
-
- 28 9月, 2009 1 次提交
-
-
由 Luciano G Panaro 提交于
Make has_one with :conditions hash scope build or creation of the associated object with those conditions Signed-off-by: NMichael Koziarski <michael@koziarski.com> [#3088 state:committed]
-
- 12 9月, 2009 1 次提交
-
-
由 Graeme Porteous 提交于
Fix has_one with foreign_key and primary_key association bug which caused the associated object being lost when saving the owner. [#1756 state:resolved] Mixed in a bit from patch by ransom-briggs. [#2813 state:resolved] Signed-off-by: NEloy Duran <eloy.de.enige@gmail.com>
-
- 12 5月, 2009 1 次提交
-
-
由 Jeremy Kemper 提交于
[#2594 state:open] This reverts commit 99c103be.
-
- 02 5月, 2009 1 次提交
-
-
由 Ruy Asan 提交于
[#2594 state:committed] Signed-off-by: NJeremy Kemper <jeremy@bitsweat.net>
-
- 21 3月, 2009 1 次提交
-
-
由 Pratik Naik 提交于
-
- 12 3月, 2009 1 次提交
-
-
由 Will Bryant 提交于
Signed-off-by: NPratik Naik <pratiknaik@gmail.com>
-
- 09 3月, 2009 1 次提交
-
-
由 Jeremy Kemper 提交于
[#1617 state:resolved]
-
- 07 3月, 2009 1 次提交
-
-
由 Dimitri Krassovski 提交于
Ensure replacing has_one associations respects the supplied :dependent option. [#1305 state:resolved] Signed-off-by: NPratik Naik <pratiknaik@gmail.com>
-
- 27 2月, 2009 1 次提交
-
-
由 David Heinemeier Hansson 提交于
-
- 14 10月, 2008 1 次提交
-
-
由 Pratik Naik 提交于
Ensure methods called on association proxies respect access control. [#1083 state:resolved] [Adam Milligan, Pratik]
-
- 21 8月, 2008 1 次提交
-
-
由 Jakub Kuźma 提交于
Signed-off-by: NPratik Naik <pratiknaik@gmail.com>
-
- 01 8月, 2008 1 次提交
-
-
由 Tarmo Tänav 提交于
Signed-off-by: NJoshua Peek <josh@joshpeek.com>
-
- 07 7月, 2008 1 次提交
-
-
由 Brad Greenlee 提交于
Add support for :primary_key option to has_one as well as has_many so that a key other than the default primary key can be used for the association Signed-off-by: NMichael Koziarski <michael@koziarski.com>
-
- 11 6月, 2008 1 次提交
-
-
由 Jan De Poorter 提交于
Signed-off-by: NPratik Naik <pratiknaik@gmail.com>
-
- 24 5月, 2008 2 次提交
-
-
由 Michael Koziarski 提交于
-
由 josevalim 提交于
Signed-off-by: NMichael Koziarski <michael@koziarski.com> [#241 state:resolved]
-