aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-04-08 20:56:33 +0100
committerAaron Patterson <aaron.patterson@gmail.com>2011-04-12 19:46:04 -0700
commit8572ae6671c6ec7c2524f327cee82215896e5648 (patch)
treeb2ba0a04ef502725cee88886319fd8a3c841f404 /activerecord/test/models
parent5740d4ec0c16d68b82f440e74fd8b74ae3fe48e6 (diff)
downloadrails-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.rb2
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