aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/scoping
Commit message (Collapse)AuthorAgeFilesLines
* Fix named scope + class method exampleCarlos Antonio da Silva2013-01-071-3/+1
| | | | | | | Closes #8804 [ci skip] Conflicts: activerecord/lib/active_record/scoping/named.rb
* backport 68677ffb8298105eb9d3efa26d928dd88cc5e006Evan Petrie2012-09-281-2/+2
|
* Restore behavior of Active Record 3.2.3 scopesAndrew White2012-06-011-2/+2
| | | | | | | | | | | | | | A series of commits relating to preloading and scopes caused a regression. Cloning the relation calls initialize_copy which resets a number of instance variables to nil. Without this the scope thinks that it is already loaded when it is called again. Reverts the following commits: 13f1401a6cf0266a3b0a91b173f976db2d4e50f3 8491740ca5361ba9df20e1c8b906c709f5bfbc12 dffbb521a0d00c8673a3ad6e0e8ff526f32daf4e Fixes #6575, #6576 & #6577
* Removes caching from ActiveRecord::Core::ClassMethods#relationBenedikt Deicke2012-04-191-2/+2
| | | | | | | | | | | | | | | The #relation method gets called in four places and the return value was instantly cloned in three of them. The only place that did not clone was ActiveRecord::Scoping::Default::ClassMethods#unscoped. This introduced a bug described in #5667 and should really clone the relation, too. This means all four places would clone the relation, so it doesn't make a lot of sense caching it in the first place. The four places with calls to relations are: activerecord/lib/active_record/scoping/default.rb:110:in `block in build_default_scope'" activerecord/lib/active_record/scoping/default.rb:42:in `unscoped'" activerecord/lib/active_record/scoping/named.rb:38:in `scoped'" activerecord/lib/active_record/scoping/named.rb:52:in `scope_attributes'" Conflicts: activerecord/lib/active_record/core.rb
* Check for nil loggerNorman Clarke2012-04-181-1/+1
|
* app code in general wants Time.current, not Time.nowXavier Noria2011-12-281-3/+3
|
* Improve doc for ActiveRecord::Base.unscoped.Hendy Tanata2011-12-201-6/+8
|
* call scope within unscoped to prevent duplication of where valuesSergey Nartimov2011-12-171-1/+1
|
* Move DefaultScope and NamedScope under ScopingJon Leighton2011-12-152-0/+342