diff options
author | Rick Olson <technoweenie@gmail.com> | 2006-03-18 23:14:31 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2006-03-18 23:14:31 +0000 |
commit | 9c9069a67595f620f80eabc475181cb36a26cdde (patch) | |
tree | a2a8aebf762be6d73ec8cab1d5f0a1c8eb84356b /activerecord/test/fixtures/post.rb | |
parent | a46214c4f9e7117796f2a5ed1414a83c2ca4c6bd (diff) | |
download | rails-9c9069a67595f620f80eabc475181cb36a26cdde.tar.gz rails-9c9069a67595f620f80eabc475181cb36a26cdde.tar.bz2 rails-9c9069a67595f620f80eabc475181cb36a26cdde.zip |
Fixed has_many :through to include :conditions set on the :through association. closes #4020 [jonathan@bluewire.net.nz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3958 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/fixtures/post.rb')
-rw-r--r-- | activerecord/test/fixtures/post.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/test/fixtures/post.rb b/activerecord/test/fixtures/post.rb index 9456582729..23f4b5d8a5 100644 --- a/activerecord/test/fixtures/post.rb +++ b/activerecord/test/fixtures/post.rb @@ -23,9 +23,11 @@ class Post < ActiveRecord::Base has_many :taggings, :as => :taggable has_many :tags, :through => :taggings has_many :super_tags, :through => :taggings - has_one :tagging, :as => :taggable + has_many :invalid_taggings, :as => :taggable, :class_name => "Tagging", :conditions => 'taggings.id < 0' + has_many :invalid_tags, :through => :invalid_taggings, :class_name => "Tag" + has_many :categorizations, :foreign_key => :category_id has_many :authors, :through => :categorizations |