Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Restore behavior of Active Record 3.2.3 scopes | Andrew White | 2012-06-01 | 1 | -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#relation | Benedikt Deicke | 2012-04-19 | 1 | -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 logger | Norman Clarke | 2012-04-18 | 1 | -1/+1 |
| | |||||
* | app code in general wants Time.current, not Time.now | Xavier Noria | 2011-12-28 | 1 | -3/+3 |
| | |||||
* | call scope within unscoped to prevent duplication of where values | Sergey Nartimov | 2011-12-17 | 1 | -1/+1 |
| | |||||
* | Move DefaultScope and NamedScope under Scoping | Jon Leighton | 2011-12-15 | 1 | -0/+202 |