- 26 1月, 2015 1 次提交
-
-
由 Sean Griffin 提交于
-
- 30 12月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
Fixes #18237
-
- 29 11月, 2014 1 次提交
-
-
由 Erik Michaels-Ober 提交于
-
- 14 11月, 2014 1 次提交
-
-
由 Arun Agrawal 提交于
`Computer` class needs to be require See #17217 for more details
-
- 09 9月, 2014 1 次提交
-
-
由 Yves Senn 提交于
Closes #16684. This is achieved by always generating `GeneratedAssociationMethods` when `ActiveRecord::Base` is subclassed. When some of the included modules of `ActiveRecord::Base` were reordered this behavior was broken as `Core#initialize_generated_modules` was no longer called. Meaning that the module was generated on first access.
-
- 05 9月, 2014 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 22 1月, 2014 1 次提交
-
-
由 Kelsey Schlarman 提交于
Need to define #reset on CollectionProxy.
-
- 01 8月, 2013 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 20 5月, 2013 1 次提交
-
-
由 Vipul A M 提交于
-
- 10 5月, 2013 1 次提交
-
-
由 Jon Leighton 提交于
Suppose Man has_many interests, and inverse_of is used. Man.first.interests.first.man will correctly execute two queries, avoiding the need for a third query when Interest#man is called. This is because CollectionAssociation#first calls set_inverse_instance. However Man.first.interests.where("1=1").first.man will execute three queries, even though this is obviously a subset of the records in the association. This is because calling where("1=1") spawns a new Relation object from the CollectionProxy object, and the Relation has no knowledge of the association, so it cannot set the inverse instance. This commit solves the problem by making relations spawned from CollectionProxies return a new Relation subclass called AssociationRelation, which does know about associations. Records loaded from this class will get the inverse instance set properly. Fixes #5717. Live commit from La Conf!
✨
-
- 06 4月, 2013 1 次提交
-
-
由 Anupam Choudhury 提交于
-
- 15 3月, 2013 1 次提交
-
-
由 Jon Leighton 提交于
This reimplements the behaviour of Rails 3, as I couldn't see why we shouldn't cache the object, and @alindeman had a good use case for caching it: https://github.com/rails/rails/commit/c86a32d7451c5d901620ac58630460915292f88b#commitcomment-2784312
-
- 14 3月, 2013 1 次提交
-
-
由 Vipul A M 提交于
-
- 02 3月, 2013 1 次提交
-
-
由 Yves Senn 提交于
Closes #7364. Collection associations behave similar to Arrays. However there is no way to prepend records. And to append one should use `<<`. Before this patch `#append` and `#prepend` did not add the record to the loaded association. `#append` now behaves like `<<` and `#prepend` is not defined.
-
- 29 11月, 2012 1 次提交
-
-
由 Steve Klabnik 提交于
Fixes #7418.
-
- 02 8月, 2012 1 次提交
-
-
由 Jon Leighton 提交于
This can be used to get a Relation from an association. Previously we had a #scoped method, but we're deprecating that for AR::Base, so it doesn't make sense to have it here. This was requested by DHH, to facilitate code like this: Project.scope.order('created_at DESC').page(current_page).tagged_with(@tag).limit(5).scoping do @topics = @project.topics.scope @todolists = @project.todolists.scope @attachments = @project.attachments.scope @documents = @project.documents.scope end
-
- 28 7月, 2012 2 次提交
-
-
由 Jon Leighton 提交于
It has been moved to active_record_deprecated_finders. Use #to_a instead.
-
由 Jon Leighton 提交于
It doesn't serve much purpose now that ActiveRecord::Base.all returns a Relation. The code is moved to active_record_deprecated_finders.
-
- 25 7月, 2012 1 次提交
-
-
由 Rafael Mendonça França 提交于
Closes #1190
-
- 27 4月, 2012 3 次提交
-
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
由 Jon Leighton 提交于
-
- 17 1月, 2012 2 次提交
-
-
由 Jon Leighton 提交于
See the CHANGELOG for details. Fixes #950.
-
由 Jon Leighton 提交于
This reverts commit c99d507f.
-
- 29 12月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
-
- 30 11月, 2011 1 次提交
-
-
由 Josh Susser 提交于
-
- 16 11月, 2011 2 次提交
-
-
由 Josh Susser 提交于
-
由 Josh Susser 提交于
Instead of generating association methods directly in the model class, they are generated in an anonymous module which is then included in the model class. There is one such module for each association. The only subtlety is that the generated_attributes_methods module (from ActiveModel) must be forced to be included before association methods are created so that attribute methods will not shadow association methods.
-
- 14 8月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Add a proxy_association method to association proxies, which can be called by association extensions to access information about the association. This replaces proxy_owner etc with proxy_association.owner.
-
- 27 7月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Add a proxy_association method to association proxies, which can be called by association extensions to access information about the association. This replaces proxy_owner etc with proxy_association.owner.
-
- 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.
-
- 25 5月, 2011 1 次提交
-
-
由 Josh Kalderimis 提交于
-
- 20 5月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Implement proxy_owner, proxy_target and proxy_reflection methods on CollectionProxy with deprecations. Fixes #1148.
-
- 11 5月, 2011 1 次提交
-
-
由 Vishnu Atrai 提交于
-
- 28 3月, 2011 2 次提交
-
-
由 Sebastian Martinez 提交于
Signed-off-by: NSantiago Pastorino <santiago@wyeworks.com>
-
由 Sebastian Martinez 提交于
This reverts commit 45c233ef. Signed-off-by: NSantiago Pastorino <santiago@wyeworks.com>
-
- 26 3月, 2011 1 次提交
-
-
由 Sebastian Martinez 提交于
Signed-off-by: NSantiago Pastorino <santiago@wyeworks.com>
-
- 19 2月, 2011 1 次提交
-
-
由 Jon Leighton 提交于
Remove test which was broken on 1.8. This test is now irrelevant since singular associations no longer return a proxy object.
-
- 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.
-