diff options
author | José Valim <jose.valim@gmail.com> | 2011-06-05 00:12:05 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-06-05 00:12:05 -0700 |
commit | b5b31658bcc963ebb4a8577715d81bb80ddaab3c (patch) | |
tree | c032fe6fd32efeef7dc18e016e32315846f0688e /activerecord/test/models/comment.rb | |
parent | 9cdd606a9b693204c8393ffc0ca1bfbd1e14e5ad (diff) | |
parent | 0695eb6dac751e0e46bb9fd0ac5d70c0a94a86b1 (diff) | |
download | rails-b5b31658bcc963ebb4a8577715d81bb80ddaab3c.tar.gz rails-b5b31658bcc963ebb4a8577715d81bb80ddaab3c.tar.bz2 rails-b5b31658bcc963ebb4a8577715d81bb80ddaab3c.zip |
Merge pull request #1462 from arunagw/test_added_for_namedscope
Test added for namedscope target.
Diffstat (limited to 'activerecord/test/models/comment.rb')
-rw-r--r-- | activerecord/test/models/comment.rb | 3 |
1 files changed, 2 insertions, 1 deletions
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 |