diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-09-01 05:31:56 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-09-01 05:31:56 +0000 |
commit | b1257d96b7b2482fc7811e5dc12d71c9fa091d10 (patch) | |
tree | 244c5033c18cf4de0745f5d01def696accd618bc /activerecord/lib/active_record/associations/association_proxy.rb | |
parent | 9c99be88b2806600f768b74bcfff1bc93de8c5ef (diff) | |
download | rails-b1257d96b7b2482fc7811e5dc12d71c9fa091d10.tar.gz rails-b1257d96b7b2482fc7811e5dc12d71c9fa091d10.tar.bz2 rails-b1257d96b7b2482fc7811e5dc12d71c9fa091d10.zip |
has_many :through conditions are sanitized by the associating class. Closes #5971.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4893 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/associations/association_proxy.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/association_proxy.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/association_proxy.rb b/activerecord/lib/active_record/associations/association_proxy.rb index 1d313fc537..ac7188d712 100644 --- a/activerecord/lib/active_record/associations/association_proxy.rb +++ b/activerecord/lib/active_record/associations/association_proxy.rb @@ -41,7 +41,7 @@ module ActiveRecord end def conditions - @conditions ||= eval("%(#{@reflection.active_record.send :sanitize_sql, @reflection.options[:conditions]})") if @reflection.options[:conditions] + @conditions ||= eval("%(#{@reflection.klass.send :sanitize_sql, @reflection.options[:conditions]})") if @reflection.options[:conditions] end alias :sql_conditions :conditions |