Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
| * | Rename AssociationReflection#primary_key_name to foreign_key, since the ↵ | Jon Leighton | 2010-12-31 | 1 | -1/+1 | |
| | | | | | | | | options key which it relates to is :foreign_key | |||||
| * | I N C E P T I O N: flatten_deeper works around a bug in Ruby 1.8.2. | Aaron Patterson | 2010-12-27 | 1 | -1/+1 | |
| | | ||||||
| * | Refactor we_can_set_the_inverse_on_this? to use a less bizarre name amongst ↵ | Jon Leighton | 2010-12-26 | 1 | -1/+1 | |
| | | | | | | | | other things | |||||
| * | Add a HasAssociation module for common code for has_* associations | Jon Leighton | 2010-12-26 | 1 | -2/+1 | |
| | | ||||||
| * | Use conditionals and implicit returns rather than explicit returns and ↵ | Jon Leighton | 2010-12-26 | 1 | -3/+7 | |
| | | | | | | | | postfix ifs (it's easier to read) | |||||
| * | Remove has_cached_counter? and cached_counter_attribute_name from ↵ | Jon Leighton | 2010-12-26 | 1 | -8/+0 | |
| | | | | | | | | HasManyThroughAssociation, as the exact same methods are inherited from HasManyAssociation | |||||
| * | Use the through association proxy for operations on the through record, so ↵ | Jon Leighton | 2010-12-26 | 1 | -2/+2 | |
| | | | | | | | | 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. | |||||
| * | Delete create, create! and create_record from HasManyThroughAssociation in ↵ | Jon Leighton | 2010-12-20 | 1 | -18/+0 | |
| | | | | | | | | exchange for more generic versions in AssociationCollection | |||||
| * | Specify insert_record with NotImplementedError in AssociationCollection, to ↵ | Jon Leighton | 2010-12-20 | 1 | -5/+1 | |
| | | | | | | | | indicate that subclasses should implement it. Also add save_record to reduce duplication. | |||||
| * | Respect the default_scope on a join model when reading a through association | Jon Leighton | 2010-12-16 | 1 | -1/+1 | |
| | | ||||||
| * | just copy the joins to the list | Aaron Patterson | 2010-12-16 | 1 | -1/+1 | |
| | | ||||||
* | | Merge branch 'master' into nested_has_many_through | Jon Leighton | 2010-12-12 | 1 | -2/+2 | |
|\| | | | | | | | | | | | | | | | 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 | |||||
| * | Partialy revert f1c13b0dd7b22b5f6289ca1a09f1d7a8c7c8584b | José Valim | 2010-11-28 | 1 | -2/+2 | |
| | | ||||||
* | | Merge branch 'master' into nested_has_many_through | Jon Leighton | 2010-11-17 | 1 | -3/+2 | |
|\| | | | | | | | | | | | Conflicts: activerecord/lib/active_record/associations/has_many_through_association.rb activerecord/test/cases/associations/has_many_through_associations_test.rb | |||||
| * | Remove unused var | Santiago Pastorino | 2010-11-14 | 1 | -1/+1 | |
| | | ||||||
| * | Fix bug where size of through association is not correct after adding a ↵ | Jason Cheow | 2010-11-14 | 1 | -1/+0 | |
| | | | | | | | | | | | | | | | | has_many association (occurs only before main object has been reloaded). [#5968 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | |||||
| * | 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 | -15/+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. | |||||
* | | Fix naughty trailing whitespace | Jon Leighton | 2010-10-31 | 1 | -2/+2 | |
| | | ||||||
* | | Remove obsolete require to active_record/associations/nested_has_many_through | Jon Leighton | 2010-10-19 | 1 | -1/+0 | |
| | | ||||||
* | | Refactoring: replace the mix of variables like @finder_sql, @counter_sql, ↵ | Jon Leighton | 2010-10-17 | 1 | -15/+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. | |||||
* | | Make sure nested through associations are read only | Jon Leighton | 2010-10-15 | 1 | -0/+10 | |
| | | ||||||
* | | Integrate nested support into ThroughAssociationScope, using my concept of ↵ | Jon Leighton | 2010-10-02 | 1 | -1/+0 | |
| | | | | | | | | generating a 'chain' of reflections to be joined. It seems to work at the moment, all existing tests are passing. There may be further complications as we add more test cases for nested associations, though. | |||||
* | | Started implementing nested :through associations by using the existing ↵ | Jon Leighton | 2010-10-01 | 1 | -1/+1 | |
| | | | | | | | | structure of ThroughAssociationScope rather than layering a module over the top | |||||
* | | Initial nested_has_many_through support [#1152] | Bodaniel Jeanes | 2010-09-26 | 1 | -0/+2 | |
|/ | ||||||
* | Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵ | Santiago Pastorino | 2010-08-14 | 1 | -3/+3 | |
| | | | | 's/[ \t]*$//' -i {} \;) | |||||
* | ensuring that description does not exceed 100 columns | Neeraj Singh | 2010-08-02 | 1 | -3/+4 | |
| | ||||||
* | Adds title to activerecord/lib/active_record/associations/* | Rizwan Reza | 2010-06-16 | 1 | -0/+1 | |
| | ||||||
* | adds missing requires for Object#blank? and Object#present? | Xavier Noria | 2010-03-28 | 1 | -0/+1 | |
| | ||||||
* | save(false) is gone, use save(:validate => false) instead. | José Valim | 2010-01-17 | 1 | -1/+1 | |
| | ||||||
* | Make scopes use relations under the hood | Pratik Naik | 2010-01-16 | 1 | -2/+0 | |
| | ||||||
* | Merge commit 'rails/master' | Emilio Tagua | 2009-08-10 | 1 | -19/+16 | |
|\ | ||||||
| * | Remove unnecessary scoping for creating hm:t join record | Pratik Naik | 2009-08-10 | 1 | -3/+4 | |
| | | ||||||
| * | Remove unnecessary scoping and validation checks from hm:t#create | Pratik Naik | 2009-08-10 | 1 | -1/+1 | |
| | | ||||||
| * | Unify hm:t#create and create! implementation | Pratik Naik | 2009-08-10 | 1 | -17/+13 | |
| | | ||||||
* | | Merge commit 'rails/master' | Emilio Tagua | 2009-08-10 | 1 | -2/+6 | |
|\| | | | | | | | | | | | | | Conflicts: activerecord/lib/active_record/calculations.rb activerecord/lib/active_record/connection_adapters/mysql_adapter.rb activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | |||||
| * | has_many :through create should not raise validation errors | railsbob | 2009-08-09 | 1 | -1/+5 | |
| | | | | | | | | | | | | [#2934 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | |||||
| * | Ensure hm:t#find does not assign nil to :include [#1845 state:resolved] | railsbob | 2009-08-09 | 1 | -1/+1 | |
| | | | | | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | |||||
* | | Merge commit 'rails/master' | Emilio Tagua | 2009-08-10 | 1 | -0/+4 | |
|\| | | | | | | | | | Conflicts: activerecord/lib/active_record/migration.rb | |||||
| * | Ensure hm:t#create/create! throws ActiveRecord::RecordNotSaved when the ↵ | Pratik Naik | 2009-08-08 | 1 | -0/+4 | |
| | | | | | | | | owner is new | |||||
* | | Merge commit 'rails/master' | Emilio Tagua | 2009-06-30 | 1 | -9/+1 | |
|\| | ||||||
| * | Revert "Revert "Generate proper :counter_sql from :finder_sql when there is ↵ | Pratik Naik | 2009-07-01 | 1 | -9/+1 | |
| | | | | | | | | | | | | | | | | | | a newline character immediately following 'SELECT' [#2118 state:resolved]"" This reverts commit 80f1f863cd0f9cba89079511282de5710a2e1832. The feature doesn't work on Postgres, so don't test it on Postgres. Also, Postgres compatibility is irrelevant to the ticket/patch in question. | |||||
| * | Revert "Generate proper :counter_sql from :finder_sql when there is a ↵ | Yehuda Katz + Carl Lerche | 2009-06-22 | 1 | -1/+9 | |
| | | | | | | | | | | | | | | | | newline character immediately following 'SELECT' [#2118 state:resolved]" This reverts commit 4851ca9e13a4317342df02ae25b1929340523f7a. The tests do not pass for postgresql. | |||||
| * | Generate proper :counter_sql from :finder_sql when there is a newline ↵ | Patrick Joyce | 2009-06-21 | 1 | -9/+1 | |
| | | | | | | | | | | | | character immediately following 'SELECT' [#2118 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | |||||
* | | Leave the quoting part to ARel | Emilio Tagua | 2009-06-12 | 1 | -150/+5 | |
|\| | ||||||
| * | HasOneThroughAssociation still shouldn't derive from HasManyThroughAssociation. | Adam Milligan | 2009-06-12 | 1 | -150/+5 | |
| | | | | | | | | | | | | [#1642 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | |||||
* | | Use ARel in SQL generation through associations | Emilio Tagua | 2009-06-10 | 1 | -4/+4 | |
|/ | ||||||
* | Ensure HasManyThroughAssociation#destroy delete orphan records [#2251 ↵ | Luca Guidi | 2009-05-18 | 1 | -0/+7 | |
| | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | |||||
* | Providing support for :inverse_of as an option to associations. | Murray Steele | 2009-05-04 | 1 | -5/+5 | |
| | | | | | | | | | | | | | | | | | | | | | | You can now add an :inverse_of option to has_one, has_many and belongs_to associations. This is best described with an example: class Man < ActiveRecord::Base has_one :face, :inverse_of => :man end class Face < ActiveRecord::Base belongs_to :man, :inverse_of => :face end m = Man.first f = m.face Without :inverse_of m and f.man would be different instances of the same object (f.man being pulled from the database again). With these new :inverse_of options m and f.man are the same in memory instance. Currently :inverse_of supports has_one and has_many (but not the :through variants) associations. It also supplies inverse support for belongs_to associations where the inverse is a has_one and it's not a polymorphic. Signed-off-by: Murray Steele <muz@h-lame.com> Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> |