aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/category.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/models/category.rb')
-rw-r--r--activerecord/test/models/category.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/activerecord/test/models/category.rb b/activerecord/test/models/category.rb
index 95825c72ef..02b85fd38a 100644
--- a/activerecord/test/models/category.rb
+++ b/activerecord/test/models/category.rb
@@ -22,9 +22,12 @@ class Category < ActiveRecord::Base
end
has_many :categorizations
- has_many :authors, :through => :categorizations, :select => 'authors.*, categorizations.post_id'
-
has_many :post_comments, :through => :posts, :source => :comments
+
+ has_many :authors, :through => :categorizations
+ has_many :authors_with_select, :through => :categorizations, :source => :author, :select => 'authors.*, categorizations.post_id'
+
+ scope :general, :conditions => { :name => 'General' }
end
class SpecialCategory < Category