aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2006-03-18 18:01:50 +0000
committerRick Olson <technoweenie@gmail.com>2006-03-18 18:01:50 +0000
commit50103b86e6f5e6aa82448d6bfdafeac34e0c8caa (patch)
tree31b7562585673b164a95dfbd1762adcc942ef2bd /activerecord/lib/active_record/associations
parentb2122159b1eed173b37d0a240cb9d933f7564d24 (diff)
downloadrails-50103b86e6f5e6aa82448d6bfdafeac34e0c8caa.tar.gz
rails-50103b86e6f5e6aa82448d6bfdafeac34e0c8caa.tar.bz2
rails-50103b86e6f5e6aa82448d6bfdafeac34e0c8caa.zip
fixed has_many :conditions sanitizing (closes #4278) [hakuja@hakuja.net]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3935 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/associations')
-rw-r--r--activerecord/lib/active_record/associations/association_proxy.rb2
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 4ddeb84a58..583f8c04b1 100644
--- a/activerecord/lib/active_record/associations/association_proxy.rb
+++ b/activerecord/lib/active_record/associations/association_proxy.rb
@@ -27,7 +27,7 @@ module ActiveRecord
end
def conditions
- @conditions ||= eval("%(#{@reflection.options[:conditions]})") if @reflection.options[:conditions]
+ @conditions ||= eval("%(#{@reflection.active_record.send :sanitize_sql, @reflection.options[:conditions]})") if @reflection.options[:conditions]
end
alias :sql_conditions :conditions