diff options
author | Jon Leighton <j@jonathanleighton.com> | 2010-10-19 00:27:40 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2010-10-19 00:27:40 +0100 |
commit | 9ec07348749675110843c44f680da79223218db2 (patch) | |
tree | e4a356d2b6ee95232097fac21df5a04118dcc014 /activerecord/test/models/tagging.rb | |
parent | 78b8c51cb3b0c629152f3bbaf6d8bcf988cc936e (diff) | |
download | rails-9ec07348749675110843c44f680da79223218db2.tar.gz rails-9ec07348749675110843c44f680da79223218db2.tar.bz2 rails-9ec07348749675110843c44f680da79223218db2.zip |
Properly support conditions on any of the reflections involved in a nested through association
Diffstat (limited to 'activerecord/test/models/tagging.rb')
-rw-r--r-- | activerecord/test/models/tagging.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/test/models/tagging.rb b/activerecord/test/models/tagging.rb index a1fa1a9750..c92df88e71 100644 --- a/activerecord/test/models/tagging.rb +++ b/activerecord/test/models/tagging.rb @@ -6,5 +6,6 @@ class Tagging < ActiveRecord::Base belongs_to :tag, :include => :tagging belongs_to :super_tag, :class_name => 'Tag', :foreign_key => 'super_tag_id' belongs_to :invalid_tag, :class_name => 'Tag', :foreign_key => 'tag_id' + belongs_to :blue_tag, :class_name => 'Tag', :foreign_key => :tag_id, :conditions => "tags.name = 'Blue'" belongs_to :taggable, :polymorphic => true, :counter_cache => true -end
\ No newline at end of file +end |