aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorheruku <ukutaht@Ukus-MacBook-Pro.local>2013-11-24 03:47:17 -0600
committerdbc-apprentice <apprentice@devbootcamp.com>2013-11-26 09:04:03 -0600
commit45d4d141f971e50e2df40bbf3559ee254ebc81b9 (patch)
tree0e8a9680d7783324ba2e4020edfa943c921c48e9 /activerecord/test/models
parent3669704050edfeb125d79a838d18584ec4a51a1a (diff)
downloadrails-45d4d141f971e50e2df40bbf3559ee254ebc81b9.tar.gz
rails-45d4d141f971e50e2df40bbf3559ee254ebc81b9.tar.bz2
rails-45d4d141f971e50e2df40bbf3559ee254ebc81b9.zip
changed update counter to act on unscoped model
Diffstat (limited to 'activerecord/test/models')
-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?