aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/topic.rb
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2013-11-26 07:16:17 -0800
committerYves Senn <yves.senn@gmail.com>2013-11-26 07:16:17 -0800
commitd35678242cbb45f19039e3da6ba13911951b1f9b (patch)
tree0e8a9680d7783324ba2e4020edfa943c921c48e9 /activerecord/test/models/topic.rb
parent3669704050edfeb125d79a838d18584ec4a51a1a (diff)
parent45d4d141f971e50e2df40bbf3559ee254ebc81b9 (diff)
downloadrails-d35678242cbb45f19039e3da6ba13911951b1f9b.tar.gz
rails-d35678242cbb45f19039e3da6ba13911951b1f9b.tar.bz2
rails-d35678242cbb45f19039e3da6ba13911951b1f9b.zip
Merge pull request #13018 from heruku/scoping_fix
changed update counter to act on unscoped model
Diffstat (limited to 'activerecord/test/models/topic.rb')
-rw-r--r--activerecord/test/models/topic.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/models/topic.rb b/activerecord/test/models/topic.rb
index 40c8e97fc2..f81ffe1d90 100644
--- a/activerecord/test/models/topic.rb
+++ b/activerecord/test/models/topic.rb
@@ -106,6 +106,10 @@ class ImportantTopic < Topic
serialize :important, Hash
end
+class DefaultRejectedTopic < Topic
+ default_scope -> { where(approved: false) }
+end
+
class BlankTopic < Topic
# declared here to make sure that dynamic finder with a bang can find a model that responds to `blank?`
def blank?