Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
| * | Add documentation for the :foreign_type option on belongs_to | Jon Leighton | 2011-01-03 | 1 | -0/+5 | |
| | | ||||||
| * | Rename AssociationReflection#primary_key_name to foreign_key, since the ↵ | Jon Leighton | 2010-12-31 | 1 | -2/+2 | |
| | | | | | | | | options key which it relates to is :foreign_key | |||||
| * | Get rid of extra_conditions param from configure_dependency_for_has_many. I ↵ | Jon Leighton | 2010-12-31 | 1 | -9/+3 | |
| | | | | | | | | can't see a particularly plausible argument for this being used by plugins, and if they really want they can just redefine the callback or whatever. Note also that before my recent commit the extra_conditions param was completely ignored for :dependent => :destroy. | |||||
| * | Refactor configure_dependency_for_has_many to use ↵ | Jon Leighton | 2010-12-31 | 1 | -38/+20 | |
| | | | | | | | | AssociationCollection#delete_all. It was necessary to change test_before_destroy in lifecycle_test.rb so that it checks topic.replies.size *before* doing the destroy, as afterwards it will now (correctly) be 0. | |||||
| * | Add a HasAssociation module for common code for has_* associations | Jon Leighton | 2010-12-26 | 1 | -0/+2 | |
| | | ||||||
| * | Raise an error for associations which try to go :through a polymorphic ↵ | Jon Leighton | 2010-12-23 | 1 | -1/+7 | |
| | | | | | | | | association [#6212 state:resolved] | |||||
| * | If a has_many goes :through a belongs_to, and the foreign key of the ↵ | Jon Leighton | 2010-12-23 | 1 | -1/+5 | |
| | | | | | | | | belongs_to changes, then the has_many should be considered stale. | |||||
| * | Improved strategy for updating a belongs_to association when the foreign key ↵ | Jon Leighton | 2010-12-23 | 1 | -42/+1 | |
| | | | | | | | | changes. Rather than resetting each affected association when the foreign key changes, we should lazily check for 'staleness' (where fk does not match target id) when the association is accessed. | |||||
| * | Revert "Optimize <association>_ids for hm:t with belongs_to source". The ↵ | Jon Leighton | 2010-12-23 | 1 | -8/+1 | |
| | | | | | | | | | | | | | | | | | | | | optimisation has too many edge cases, such as when the reflection, source reflection, or through reflection has conditions, orders, etc. [#6153 state:resolved] This reverts commit 373b053dc8b99dac1abc3879a17a2bf8c30302b5. Conflicts: activerecord/lib/active_record/associations.rb | |||||
| * | Don't allow a has_one association to go :through a collection association ↵ | Jon Leighton | 2010-12-23 | 1 | -0/+6 | |
| | | | | | | | | [#2976 state:resolved] | |||||
* | | Merge branch 'master' into nested_has_many_through | Jon Leighton | 2010-12-12 | 1 | -0/+41 | |
|\| | | | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/associations/class_methods/join_dependency.rb activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb activerecord/lib/active_record/associations/has_many_through_association.rb | |||||
| * | removing method to prevent warnings | Aaron Patterson | 2010-12-08 | 1 | -0/+4 | |
| | | ||||||
| * | Setting the id of a belongs_to object updates all referenced objects [#2989 ↵ | Jeff Dean | 2010-12-08 | 1 | -0/+37 | |
| | | | | | | | | state:resolved] | |||||
* | | Merge branch 'master' into nested_has_many_through | Jon Leighton | 2010-11-27 | 1 | -552/+8 | |
|\| | | | | | | | | | | | Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/associations.rb | |||||
| * | breaking classes up in to respective files | Aaron Patterson | 2010-11-23 | 1 | -574/+1 | |
| | | ||||||
| * | class inheritable attributes is used no more! all internal use of class ↵ | Josh Kalderimis | 2010-11-20 | 1 | -6/+7 | |
| | | | | | | | | | | | | inheritable has been changed to class_attribute. class inheritable attributes has been deprecated. Signed-off-by: José Valim <jose.valim@gmail.com> | |||||
* | | Merge branch 'master' into nested_has_many_through | Jon Leighton | 2010-11-17 | 1 | -1/+1 | |
|\| | | | | | | | | | | | Conflicts: activerecord/lib/active_record/associations/has_many_through_association.rb activerecord/test/cases/associations/has_many_through_associations_test.rb | |||||
| * | 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> | |||||
* | | Merge branch 'master' into nested_has_many_through | Jon Leighton | 2010-11-08 | 1 | -20/+18 | |
|\| | | | | | | | | | Conflicts: activerecord/lib/active_record/associations.rb | |||||
| * | reduce duplication in assiciations #construct() | Aaron Patterson | 2010-11-06 | 1 | -9/+3 | |
| | | ||||||
| * | make sure we keep parent records in order | Aaron Patterson | 2010-11-06 | 1 | -6/+6 | |
| | | ||||||
| * | only call to_s on the association variable once | Aaron Patterson | 2010-11-05 | 1 | -2/+5 | |
| | | ||||||
| * | simplify instantiate in the join parts object | Aaron Patterson | 2010-11-05 | 1 | -8/+7 | |
| | | ||||||
| * | index is not used, so removing it | Aaron Patterson | 2010-11-05 | 1 | -1/+1 | |
| | | ||||||
| * | reduce method calls to the join base object | Aaron Patterson | 2010-11-05 | 1 | -4/+6 | |
| | | ||||||
* | | Fix naughty trailing whitespace | Jon Leighton | 2010-10-31 | 1 | -49/+49 | |
| | | ||||||
* | | Merge branch 'master' into nested_has_many_through | Jon Leighton | 2010-10-31 | 1 | -11/+38 | |
|\| | | | | | | | | | | | Conflicts: activerecord/lib/active_record/associations/has_many_association.rb activerecord/lib/active_record/associations/through_association_scope.rb | |||||
| * | refactoring find_join_association | Aaron Patterson | 2010-10-30 | 1 | -5/+6 | |
| | | ||||||
| * | Fix issues when including the same association multiple times and mixing ↵ | Ernie Miller | 2010-10-30 | 1 | -11/+37 | |
| | | | | | | | | joins/includes together. | |||||
* | | Merge branch 'master' into nested_has_many_through | Jon Leighton | 2010-10-28 | 1 | -16/+16 | |
|\| | | | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/association_preload.rb activerecord/lib/active_record/associations.rb activerecord/test/schema/schema.rb | |||||
| * | removing space errors | Aaron Patterson | 2010-10-22 | 1 | -45/+45 | |
| | | ||||||
| * | Delete unused methods in JoinAssociation | Jon Leighton | 2010-10-13 | 1 | -8/+0 | |
| | | ||||||
| * | Renaming and formatting changes in JoinDependency | Jon Leighton | 2010-10-13 | 1 | -47/+51 | |
| | | ||||||
| * | Refactor JoinDependency and friends so that a JoinAssociation can produce an ↵ | Jon Leighton | 2010-10-13 | 1 | -145/+265 | |
| | | | | | | | | arbitrary number of joins, which will be needed in order to support nested through associations. | |||||
* | | Fix typo | Jon Leighton | 2010-10-19 | 1 | -1/+1 | |
| | | ||||||
* | | Remove obsolete autoload | Jon Leighton | 2010-10-19 | 1 | -1/+0 | |
| | | ||||||
* | | Add some API documentation about nested through associations | Jon Leighton | 2010-10-19 | 1 | -8/+52 | |
| | | ||||||
* | | Remove various comments and code which were just being used during the ↵ | Jon Leighton | 2010-10-19 | 1 | -8/+0 | |
| | | | | | | | | development of nested through association support (OMFGZ, I might just have nearly finished this\! | |||||
* | | Small refactoring | Jon Leighton | 2010-10-19 | 1 | -6/+2 | |
| | | ||||||
* | | Bugfix/refactoring | Jon Leighton | 2010-10-19 | 1 | -6/+6 | |
| | | ||||||
* | | Support for :primary_key option on the source reflection of a through ↵ | Jon Leighton | 2010-10-19 | 1 | -6/+4 | |
| | | | | | | | | association, where the source is a has_one or has_many | |||||
* | | Properly support conditions on any of the reflections involved in a nested ↵ | Jon Leighton | 2010-10-19 | 1 | -6/+9 | |
| | | | | | | | | through association | |||||
* | | Make sure nested through associations are read only | Jon Leighton | 2010-10-15 | 1 | -0/+6 | |
| | | ||||||
* | | Fix small bug which was shown by the last commit | Jon Leighton | 2010-10-15 | 1 | -1/+1 | |
| | | ||||||
* | | First bit of support for habtm in through assocs - ↵ | Jon Leighton | 2010-10-13 | 1 | -10/+35 | |
| | | | | | | | | test_has_many_through_has_many_with_has_and_belongs_to_many_source_reflection now passes | |||||
* | | Some small tweaks on the last commit | Jon Leighton | 2010-10-12 | 1 | -17/+5 | |
| | | ||||||
* | | Extract aliasing code from JoinDependency and JoinAssociation into a ↵ | Jon Leighton | 2010-10-12 | 1 | -41/+15 | |
| | | | | | | | | separate AliasTracker class. This can then be used by ThroughAssociationScope as well. | |||||
* | | Refactoring to remove duplication introduced by the last commit | Jon Leighton | 2010-10-10 | 1 | -160/+145 | |
| | | ||||||
* | | Add support for nested through associations in JoinAssociation. Hence ↵ | Jon Leighton | 2010-10-09 | 1 | -89/+85 | |
| | | | | | | | | Foo.joins(:bar) will work for through associations. There is some duplicated code now, which will be refactored. | |||||
* | | Refactoring JoinDependency and friends. This improves the code (IMO) ↵ | Jon Leighton | 2010-10-06 | 1 | -183/+307 | |
| | | | | | | | | including adding some explanatory comments, but more importantly structures it in such a way as to allow a JoinAssociation to produce an arbitrary number of actual joins, which will be necessary for nested has many through support. Also added 3 tests covering functionality which existed but was not previously covered. |