From 9066e3402548d365dc7cf2abda8e7cd64370675c Mon Sep 17 00:00:00 2001 From: Arun Agrawal Date: Mon, 5 Sep 2011 00:12:57 +0530 Subject: We need to recorder here. Need to drop the order from default scope. Fixes #2832 --- activerecord/test/models/post.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'activerecord/test/models') 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 -- cgit v1.2.3