diff options
author | Arun Agrawal <arun@fromjaipur.com> | 2011-09-05 00:12:57 +0530 |
---|---|---|
committer | Arun Agrawal <arun@fromjaipur.com> | 2011-09-05 00:12:57 +0530 |
commit | 9066e3402548d365dc7cf2abda8e7cd64370675c (patch) | |
tree | 6dda8a6eb139f8c223067e543628cc7e9b0b6e87 /activerecord/test/models | |
parent | e865d125431424562b5e252ed151f6bae8dd5e8f (diff) | |
download | rails-9066e3402548d365dc7cf2abda8e7cd64370675c.tar.gz rails-9066e3402548d365dc7cf2abda8e7cd64370675c.tar.bz2 rails-9066e3402548d365dc7cf2abda8e7cd64370675c.zip |
We need to recorder here. Need to drop the order from default scope.
Fixes #2832
Diffstat (limited to 'activerecord/test/models')
-rw-r--r-- | activerecord/test/models/post.rb | 10 |
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 |