From 0695eb6dac751e0e46bb9fd0ac5d70c0a94a86b1 Mon Sep 17 00:00:00 2001 From: Arun Agrawal Date: Fri, 3 Jun 2011 08:28:00 +0530 Subject: Test added for namedscope target. --- activerecord/test/models/comment.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activerecord/test/models/comment.rb') diff --git a/activerecord/test/models/comment.rb b/activerecord/test/models/comment.rb index 2a4c37089a..43650c0427 100644 --- a/activerecord/test/models/comment.rb +++ b/activerecord/test/models/comment.rb @@ -6,7 +6,8 @@ class Comment < ActiveRecord::Base scope :for_first_author, :joins => :post, :conditions => { "posts.author_id" => 1 } - + scope :created + belongs_to :post, :counter_cache => true has_many :ratings -- cgit v1.2.3