aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-09-04 13:39:28 -0700
committerJon Leighton <j@jonathanleighton.com>2011-09-04 13:39:28 -0700
commit6c4650606735b51d86f9d0fa7711dc87f33d98df (patch)
tree6dda8a6eb139f8c223067e543628cc7e9b0b6e87 /activerecord/test/models
parente865d125431424562b5e252ed151f6bae8dd5e8f (diff)
parent9066e3402548d365dc7cf2abda8e7cd64370675c (diff)
downloadrails-6c4650606735b51d86f9d0fa7711dc87f33d98df.tar.gz
rails-6c4650606735b51d86f9d0fa7711dc87f33d98df.tar.bz2
rails-6c4650606735b51d86f9d0fa7711dc87f33d98df.zip
Merge pull request #2855 from arunagw/fix_find_in_batches_master
We need to recorder here. Need to drop the order from default scope.
Diffstat (limited to 'activerecord/test/models')
-rw-r--r--activerecord/test/models/post.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/activerecord/test/models/post.rb b/activerecord/test/models/post.rb
index affa37b02d..198a963cbc 100644
--- a/activerecord/test/models/post.rb
+++ b/activerecord/test/models/post.rb
@@ -171,4 +171,14 @@ class PostWithDefaultInclude < ActiveRecord::Base
self.table_name = 'posts'
default_scope includes(:comments)
has_many :comments, :foreign_key => :post_id
+end
+
+class PostWithDefaultScope < ActiveRecord::Base
+ self.table_name = 'posts'
+ default_scope :order => :title
+end
+
+class SpecialPostWithDefaultScope < ActiveRecord::Base
+ self.table_name = 'posts'
+ default_scope where(:id => [1, 5,6])
end \ No newline at end of file