aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/comment.rb
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2010-01-18 04:38:19 +0530
committerPratik Naik <pratiknaik@gmail.com>2010-01-18 04:38:19 +0530
commitd60bb0a9e4be2ac0a9de9a69041a4ddc2e0cc914 (patch)
tree0189bf9fe9888963df51987e5e330b09e2e19b59 /activerecord/test/models/comment.rb
parente1d507c7fb541d29d57d152f40e3a539e70781d0 (diff)
downloadrails-d60bb0a9e4be2ac0a9de9a69041a4ddc2e0cc914.tar.gz
rails-d60bb0a9e4be2ac0a9de9a69041a4ddc2e0cc914.tar.bz2
rails-d60bb0a9e4be2ac0a9de9a69041a4ddc2e0cc914.zip
Rename named_scope to scope
Diffstat (limited to 'activerecord/test/models/comment.rb')
-rw-r--r--activerecord/test/models/comment.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/test/models/comment.rb b/activerecord/test/models/comment.rb
index 399dea9f12..a8a99f6dce 100644
--- a/activerecord/test/models/comment.rb
+++ b/activerecord/test/models/comment.rb
@@ -1,7 +1,7 @@
class Comment < ActiveRecord::Base
- named_scope :containing_the_letter_e, :conditions => "comments.body LIKE '%e%'"
- named_scope :for_first_post, :conditions => { :post_id => 1 }
- named_scope :for_first_author,
+ scope :containing_the_letter_e, :conditions => "comments.body LIKE '%e%'"
+ scope :for_first_post, :conditions => { :post_id => 1 }
+ scope :for_first_author,
:joins => :post,
:conditions => { "posts.author_id" => 1 }