aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2014-02-23 11:14:05 +0000
committerJon Leighton <j@jonathanleighton.com>2014-02-23 11:14:05 +0000
commit40a9d8987711f7973c5e95087bcc0c59e167294b (patch)
treed9de0a56382dea5500b308116c4ace2f2ca0fa08 /activerecord/test/models
parentf8dcc485175d7e5ac3c5d2819b3a04cd2e5d4982 (diff)
downloadrails-40a9d8987711f7973c5e95087bcc0c59e167294b.tar.gz
rails-40a9d8987711f7973c5e95087bcc0c59e167294b.tar.bz2
rails-40a9d8987711f7973c5e95087bcc0c59e167294b.zip
Add tests for default scope behaviour change
See #13875
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 2e2d8a0d37..762259ffa3 100644
--- a/activerecord/test/models/developer.rb
+++ b/activerecord/test/models/developer.rb
@@ -165,6 +165,8 @@ class DeveloperCalledJamis < ActiveRecord::Base
default_scope { where(:name => 'Jamis') }
scope :poor, -> { where('salary < 150000') }
+ scope :david, -> { where name: "David" }
+ scope :david2, -> { unscoped.where name: "David" }
end
class PoorDeveloperCalledJamis < ActiveRecord::Base