diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-04-08 20:56:33 +0100 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-04-12 19:46:04 -0700 |
commit | 8572ae6671c6ec7c2524f327cee82215896e5648 (patch) | |
tree | b2ba0a04ef502725cee88886319fd8a3c841f404 /activerecord/test/models | |
parent | 5740d4ec0c16d68b82f440e74fd8b74ae3fe48e6 (diff) | |
download | rails-8572ae6671c6ec7c2524f327cee82215896e5648.tar.gz rails-8572ae6671c6ec7c2524f327cee82215896e5648.tar.bz2 rails-8572ae6671c6ec7c2524f327cee82215896e5648.zip |
Evaluate default scopes at the last possible moment in order to avoid problems with default scopes getting included into other scopes and then being unable to remove the default part via unscoped.
Diffstat (limited to 'activerecord/test/models')
-rw-r--r-- | activerecord/test/models/developer.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/models/developer.rb b/activerecord/test/models/developer.rb index 28b31caf7b..10385ba899 100644 --- a/activerecord/test/models/developer.rb +++ b/activerecord/test/models/developer.rb @@ -114,6 +114,8 @@ class DeveloperCalledJamis < ActiveRecord::Base def self.default_scope where :name => 'Jamis' end + + scope :poor, where('salary < 150000') end class AbstractDeveloperCalledJamis < ActiveRecord::Base |