aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/reader.rb
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2012-08-28 12:57:41 -0700
committerPratik Naik <pratiknaik@gmail.com>2012-08-28 12:57:41 -0700
commit58d35f62110d4280818d49f6a76b3bdaa1ee217a (patch)
tree786f6d111464f7e499c0283be1267a2b091fcde1 /activerecord/test/models/reader.rb
parent8efced68be645af03e0b49d3a12d85b8d1aaee7a (diff)
downloadrails-58d35f62110d4280818d49f6a76b3bdaa1ee217a.tar.gz
rails-58d35f62110d4280818d49f6a76b3bdaa1ee217a.tar.bz2
rails-58d35f62110d4280818d49f6a76b3bdaa1ee217a.zip
Ensure association preloading properly merges default scope and association conditions
Conflicts: activerecord/test/models/reader.rb
Diffstat (limited to 'activerecord/test/models/reader.rb')
-rw-r--r--activerecord/test/models/reader.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/models/reader.rb b/activerecord/test/models/reader.rb
index 59005ac604..9a1b539791 100644
--- a/activerecord/test/models/reader.rb
+++ b/activerecord/test/models/reader.rb
@@ -12,3 +12,11 @@ class SecureReader < ActiveRecord::Base
attr_accessible nil
end
+
+class LazyReader < ActiveRecord::Base
+ self.table_name = 'readers'
+ default_scope where(:skimmer => true)
+
+ belongs_to :post
+ belongs_to :person
+end