aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/fixtures/post.rb
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2006-03-18 23:14:31 +0000
committerRick Olson <technoweenie@gmail.com>2006-03-18 23:14:31 +0000
commit9c9069a67595f620f80eabc475181cb36a26cdde (patch)
treea2a8aebf762be6d73ec8cab1d5f0a1c8eb84356b /activerecord/test/fixtures/post.rb
parenta46214c4f9e7117796f2a5ed1414a83c2ca4c6bd (diff)
downloadrails-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.rb4
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