diff options
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index a08cd0f2df..94bdce5b19 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -944,7 +944,7 @@ module ActiveRecord #:nodoc: # Adds a sanitized version of +conditions+ to the +sql+ string. Note that the passed-in +sql+ string is changed. def add_conditions!(sql, conditions) - segments = [scope(:find, :conditions)] + segments = [sanitize_sql(scope(:find, :conditions))] segments << sanitize_sql(conditions) unless conditions.nil? segments << type_condition unless descends_from_active_record? segments.compact! |