Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Delegate through_reflection and source_reflection to reflection | Jon Leighton | 2011-02-21 | 1 | -1/+1 |
| | |||||
* | Associations - where possible, call attributes methods rather than directly ↵ | Jon Leighton | 2011-02-21 | 1 | -2/+2 |
| | | | | accessing the instance variables | ||||
* | Split AssociationProxy into an Association class (and subclasses) which ↵ | Jon Leighton | 2011-02-18 | 1 | -1/+1 |
| | | | | manages the association, and a CollectionProxy class which is *only* a proxy. Singular associations no longer have a proxy. See CHANGELOG for more. | ||||
* | Add :nodoc: to ThroughAssociation and HasOneAssociation | Jon Leighton | 2011-02-18 | 1 | -1/+1 |
| | |||||
* | Indent methods under private/protected sections | Jon Leighton | 2011-01-30 | 1 | -14/+14 |
| | |||||
* | Rename some variables | Jon Leighton | 2011-01-16 | 1 | -11/+11 |
| | |||||
* | Use self.target= in HasOneThroughAssociation too | Jon Leighton | 2011-01-16 | 1 | -4/+3 |
| | |||||
* | We can use the association_proxy method directly in HasOneThroughAssociation now | Jon Leighton | 2011-01-11 | 1 | -3/+2 |
| | |||||
* | find_target can be inherited | Jon Leighton | 2011-01-11 | 1 | -4/+0 |
| | |||||
* | Allow assignment on has_one :through where the owner is a new record [#5137 ↵ | Jon Leighton | 2011-01-03 | 1 | -1/+1 |
| | | | | | | | | | | state:resolved] This required changing the code to keep the association proxy for a belongs_to around, despite its target being nil. Which in turn required various changes to the way that stale target checking is handled, in order to support various edge cases (loaded target is nil then foreign key added, foreign key is changed and then changed back, etc). A side effect is that the code is nicer and more succinct. Note that I am removing test_no_unexpected_aliasing since that is basically checking that the proxy for a belongs_to *does* change, which is the exact opposite of the intention of this commit. Also adding various tests for various edge cases and related things. Phew, long commit message! | ||||
* | Add a HasAssociation module for common code for has_* associations | Jon Leighton | 2010-12-26 | 1 | -3/+1 |
| | |||||
* | Remove pointless use of 'private' | Jon Leighton | 2010-12-26 | 1 | -1/+0 |
| | |||||
* | Use the through association proxy for operations on the through record, so ↵ | Jon Leighton | 2010-12-26 | 1 | -11/+13 |
| | | | | that those operations are automatically scoped and therefore construct_join_attributes does not need to use construct_owner_attributes. | ||||
* | If a has_many goes :through a belongs_to, and the foreign key of the ↵ | Jon Leighton | 2010-12-23 | 1 | -0/+1 |
| | | | | belongs_to changes, then the has_many should be considered stale. | ||||
* | Respect the default_scope on a join model when reading a through association | Jon Leighton | 2010-12-16 | 1 | -1/+1 |
| | |||||
* | Partialy revert f1c13b0dd7b22b5f6289ca1a09f1d7a8c7c8584b | José Valim | 2010-11-28 | 1 | -1/+1 |
| | |||||
* | use persisted? instead of new_record? wherever possible | David Chelimsky | 2010-11-09 | 1 | -1/+1 |
| | | | | | | | | | | | - 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: Santiago Pastorino <santiago@wyeworks.com> | ||||
* | Refactoring: replace the mix of variables like @finder_sql, @counter_sql, ↵ | Jon Leighton | 2010-10-30 | 1 | -1/+1 |
| | | | | etc with just a single scope hash (created on initialization of the proxy). This is now used consistently across all associations. Therefore, all you have to do to ensure finding/counting etc is done correctly is implement the scope correctly. | ||||
* | Adds title to activerecord/lib/active_record/associations/* | Rizwan Reza | 2010-06-16 | 1 | -0/+1 |
| | |||||
* | Allow ho:through#build when the owner is a new record [#1749 state:resolved] | Tristan Dunn | 2009-08-10 | 1 | -3/+9 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | HasOneThroughAssociation still shouldn't derive from HasManyThroughAssociation. | Adam Milligan | 2009-06-12 | 1 | -10/+12 |
| | | | | | | [#1642 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | has_one :through should not create a new association when assigned nil [#698 ↵ | Daniel Guettler | 2009-05-17 | 1 | -8/+8 |
| | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | fix assignment to has_one :through associations. | Matt Jones | 2008-11-15 | 1 | -4/+3 |
| | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> | ||||
* | Fix two has_one :through errors | pivotal | 2008-08-27 | 1 | -0/+4 |
| | | | | | | | | * Set the association target on assignment; * Reset target to nil on reset, rather than empty array. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#895 state:committed] | ||||
* | Remove duplicate code from associations. [Pratik] | Pratik Naik | 2008-04-06 | 1 | -1/+1 |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9231 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Add has_one :through support, finally. Closes #4756 [thechrisoshow] | Rick Olson | 2008-03-21 | 1 | -0/+28 |
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9067 5ecf4fe2-1ee6-0310-87b1-e25e094e27de |