aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/reader.rb
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #14573 from habermann24/has_many_through_fixRafael Mendonça França2014-04-221-0/+2
|\ | | | | | | | | | | | | | | Properly handle scoping with has_many :through. Fixes #14537. Conflicts: activerecord/CHANGELOG.md activerecord/test/cases/associations/has_many_through_associations_test.rb
| * Properly handle scoping with has_many :through. Fixes #14537.Jan Habermann2014-04-031-0/+2
|/
* Prevent Relation#merge from collapsing wheres on the RHSJon Leighton2013-01-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | This caused a bug with the new associations implementation, because now association conditions are represented as Arel nodes internally right up to when the whole thing gets turned to SQL. In Rails 3.2, association conditions get turned to raw SQL early on, which prevents Relation#merge from interfering. The current implementation was buggy when a default_scope existed on the target model, since we would basically end up doing: default_scope.merge(association_scope) If default_scope contained a where(foo: 'a') and association_scope contained a where(foo: 'b').where(foo: 'c') then the merger would see that the same column is representated on both sides of the merge and collapse the wheres to all but the last: where(foo: 'c') Now, the RHS of the merge is left alone. Fixes #8990
* Remove mass assignment security from ActiveRecordGuillermo Iguaran2012-09-161-2/+0
|
* Add a test to make sure preloading properly merges association and default ↵Pratik Naik2012-08-281-0/+8
| | | | scope conditions
* Not need to pass join attributes to association buildRafael Mendonça França2012-03-071-0/+9
|
* Allow building and then later saving has_many :through records, such that ↵Jon Leighton2011-02-181-1/+2
| | | | the join record is automatically saved too. This requires the :inverse_of option to be set on the source association in the join model. See the CHANGELOG for details. [#4329 state:resolved]
* move assets and modelsJeremy Kemper2008-01-181-0/+4
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8657 5ecf4fe2-1ee6-0310-87b1-e25e094e27de