Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Ensure we are not comparing a string with a symbol in ↵ | Jon Leighton | 2011-09-06 | 1 | -1/+1 | |
| | | | | HasManyAssociation#inverse_updates_counter_cache?. Fixes #2755, where a counter cache could be decremented twice as far as it was supposed to be. | |||||
* | calling super is super. if the other object is exactly equal, we can return ↵ | Aaron Patterson | 2011-07-01 | 1 | -1/+5 | |
| | | | | early | |||||
* | Remove AssociationReflection#create_association and ↵ | Jon Leighton | 2011-06-30 | 1 | -17/+0 | |
| | | | | AssociationReflection#create_association! - they are not called from anywhere. | |||||
* | Assign the association attributes to the associated record before the ↵ | Jon Leighton | 2011-06-30 | 1 | -2/+2 | |
| | | | | before_initialize callback of the record runs. Fixes #1842. | |||||
* | cache the plural name on the reflection so we do not pay pluralize costs on ↵ | Aaron Patterson | 2011-06-30 | 1 | -6/+13 | |
| | | | | joins | |||||
* | Merge branch 'master' of github.com:rails/rails | Xavier Noria | 2011-05-25 | 1 | -6/+0 | |
|\ | ||||||
| * | removed deprecated methods, and related tests, from ActiveRecord | Josh Kalderimis | 2011-05-25 | 1 | -6/+0 | |
| | | ||||||
* | | Merge branch 'master' of git://github.com/lifo/docrails | Xavier Noria | 2011-05-25 | 1 | -1/+1 | |
|\ \ | |/ |/| | | | | | | | Conflicts: actionmailer/lib/action_mailer/base.rb activesupport/lib/active_support/core_ext/kernel/requires.rb | |||||
| * | Remove extra white spaces on ActiveRecord docs. | Sebastian Martinez | 2011-05-23 | 1 | -1/+1 | |
| | | ||||||
* | | Fix problem with loading polymorphic associations which have been defined in ↵ | Jon Leighton | 2011-05-22 | 1 | -5/+4 | |
|/ | | | | an abstract superclass. Fixes #552. | |||||
* | Remove `#among?` from Active Support | Prem Sichanugrist | 2011-04-13 | 1 | -1/+1 | |
| | | | | | | After a long list of discussion about the performance problem from using varargs and the reason that we can't find a great pair for it, it would be best to remove support for it for now. It will come back if we can find a good pair for it. For now, Bon Voyage, `#among?`. | |||||
* | Change Object#either? to Object#among? -- thanks to @jamesarosen for the ↵ | David Heinemeier Hansson | 2011-04-12 | 1 | -1/+1 | |
| | | | | suggestion! | |||||
* | Using Object#in? and Object#either? in various places | Prem Sichanugrist | 2011-04-11 | 1 | -1/+2 | |
| | | | | There're a lot of places in Rails source code which make a lot of sense to switching to Object#in? or Object#either? instead of using [].include?. | |||||
* | Simplify implementation of ThroughReflection#chain | Jon Leighton | 2011-03-11 | 1 | -22/+2 | |
| | ||||||
* | Rename Reflection#through_reflection_chain and #through_options to ↵ | Jon Leighton | 2011-03-10 | 1 | -27/+33 | |
| | | | | Reflection#chain and Reflection#options as they now no longer relate solely to through associations. | |||||
* | Move the code which builds a scope for through associations into a generic ↵ | Jon Leighton | 2011-03-10 | 1 | -3/+3 | |
| | | | | AssociationScope class which is capable of building a scope for any association. | |||||
* | Fix ↵ | Jon Leighton | 2011-03-07 | 1 | -1/+1 | |
| | | | | test_has_many_association_through_a_has_many_association_with_nonstandard_primary_keys | |||||
* | Refactor ThroughAssociation#join_to to be much smaller, and independent of ↵ | Jon Leighton | 2011-03-06 | 1 | -0/+6 | |
| | | | | construct_owner_conditions. | |||||
* | Push source_type and polymorphic conditions out of ThroughAssociation and ↵ | Jon Leighton | 2011-03-05 | 1 | -10/+11 | |
| | | | | JoinDependency::JoinAssociation and into the reflection instead. | |||||
* | Add a test for STI on the through where the through is nested, and change ↵ | Jon Leighton | 2011-03-05 | 1 | -0/+3 | |
| | | | | the code which support this | |||||
* | Merge branch 'master' into nested_has_many_through | Jon Leighton | 2011-03-04 | 1 | -18/+65 | |
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/association_preload.rb activerecord/lib/active_record/associations.rb 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_association.rb activerecord/lib/active_record/associations/has_many_through_association.rb activerecord/lib/active_record/associations/has_one_association.rb activerecord/lib/active_record/associations/has_one_through_association.rb activerecord/lib/active_record/associations/through_association_scope.rb activerecord/lib/active_record/reflection.rb activerecord/test/cases/associations/has_many_through_associations_test.rb activerecord/test/cases/associations/has_one_through_associations_test.rb activerecord/test/cases/reflection_test.rb activerecord/test/cases/relations_test.rb activerecord/test/fixtures/memberships.yml activerecord/test/models/categorization.rb activerecord/test/models/category.rb activerecord/test/models/member.rb activerecord/test/models/reference.rb activerecord/test/models/tagging.rb | |||||
| * | Rewrote AssociationPreload. | Jon Leighton | 2011-02-28 | 1 | -4/+6 | |
| | | ||||||
| * | Delegate Association#options to the reflection, and replace ↵ | Jon Leighton | 2011-02-21 | 1 | -0/+8 | |
| | | | | | | | | 'reflection.options' with 'options'. Also add through_options and source_options methods for through associations. | |||||
| * | 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. | |||||
| * | Ensure that association_ids uses the correct attribute where the association ↵ | Jon Leighton | 2011-02-18 | 1 | -0/+4 | |
| | | | | | | | | is a has_many :through with a :primary_key option on the source reflection. [#6376 state:resolved] | |||||
| * | DRY up the code which instantiates the association proxy | Jon Leighton | 2011-01-11 | 1 | -0/+25 | |
| | | ||||||
| * | Implement deprecated version of AssociationReflection#primary_key_name, ↵ | Jon Leighton | 2011-01-03 | 1 | -0/+6 | |
| | | | | | | | | which has been renamed to #foreign_key. Also bumping the deprecation_horizon in Active Support to 3.1. | |||||
| * | Have a proper AssociationReflection#foreign_type method rather than using ↵ | Jon Leighton | 2011-01-03 | 1 | -0/+4 | |
| | | | | | | | | options[:foreign_type] | |||||
| * | Rename AssociationReflection#primary_key_name to foreign_key, since the ↵ | Jon Leighton | 2010-12-31 | 1 | -7/+7 | |
| | | | | | | | | options key which it relates to is :foreign_key | |||||
| * | Now we can drop-kick AssociationReflection#dependent_conditions into oblivion. | Jon Leighton | 2010-12-31 | 1 | -11/+0 | |
| | | ||||||
| * | Raise an error for associations which try to go :through a polymorphic ↵ | Jon Leighton | 2010-12-23 | 1 | -1/+5 | |
| | | | | | | | | association [#6212 state:resolved] | |||||
| * | Improved strategy for updating a belongs_to association when the foreign key ↵ | Jon Leighton | 2010-12-23 | 1 | -1/+4 | |
| | | | | | | | | 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. | |||||
| * | Don't allow a has_one association to go :through a collection association ↵ | Jon Leighton | 2010-12-23 | 1 | -0/+4 | |
| | | | | | | | | [#2976 state:resolved] | |||||
| * | Fix problem where wrong keys are used in JoinAssociation when an association ↵ | Jon Leighton | 2010-12-20 | 1 | -0/+4 | |
| | | | | | | | | goes :through a belongs_to [#2801 state:resolved] | |||||
| * | Fix various issues with the :primary_key option in :through associations ↵ | Jon Leighton | 2010-12-15 | 1 | -1/+5 | |
| | | | | | | | | [#2421 state:resolved] | |||||
| * | reduce method calls | Aaron Patterson | 2010-12-16 | 1 | -1/+1 | |
| | | ||||||
* | | Merge branch 'master' into nested_has_many_through | Jon Leighton | 2010-12-12 | 1 | -1/+1 | |
|\ \ | | | | | | | | | | | | | | | | | | | | | | 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 | |||||
| * | | reduce method calls | Aaron Patterson | 2010-12-10 | 1 | -1/+1 | |
| |/ | ||||||
* | | Merge branch 'master' into nested_has_many_through | Jon Leighton | 2010-11-27 | 1 | -11/+9 | |
|\| | | | | | | | | | | | Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/associations.rb | |||||
| * | class inheritable attributes is used no more! all internal use of class ↵ | Josh Kalderimis | 2010-11-20 | 1 | -11/+9 | |
| | | | | | | | | | | | | inheritable has been changed to class_attribute. class inheritable attributes has been deprecated. Signed-off-by: José Valim <jose.valim@gmail.com> | |||||
* | | Fix naughty trailing whitespace | Jon Leighton | 2010-10-31 | 1 | -21/+21 | |
| | | ||||||
* | | Merge branch 'master' into nested_has_many_through | Jon Leighton | 2010-10-28 | 1 | -2/+2 | |
|\| | | | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/association_preload.rb activerecord/lib/active_record/associations.rb activerecord/test/schema/schema.rb | |||||
| * | use grep instead of select + is_a? | Aaron Patterson | 2010-10-20 | 1 | -2/+2 | |
| | | ||||||
* | | Add some comments for ThroughReflection#through_reflection_chain | Jon Leighton | 2010-10-19 | 1 | -1/+10 | |
| | | ||||||
* | | Remove various comments and code which were just being used during the ↵ | Jon Leighton | 2010-10-19 | 1 | -24/+0 | |
| | | | | | | | | development of nested through association support (OMFGZ, I might just have nearly finished this\! | |||||
* | | Add explicit tests for the nested through association changes in reflection.rb | Jon Leighton | 2010-10-19 | 1 | -2/+13 | |
| | | ||||||
* | | Bugfix/refactoring | Jon Leighton | 2010-10-19 | 1 | -0/+9 | |
| | | ||||||
* | | Remove unused methods | Jon Leighton | 2010-10-19 | 1 | -11/+0 | |
| | | ||||||
* | | Support for :primary_key option on the source reflection of a through ↵ | Jon Leighton | 2010-10-19 | 1 | -0/+8 | |
| | | | | | | | | 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 | -3/+50 | |
| | | | | | | | | through association |