diff options
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/associations/has_many_association.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/has_many_association.rb b/activerecord/lib/active_record/associations/has_many_association.rb index 92f6f4c262..f3ab6bcdab 100644 --- a/activerecord/lib/active_record/associations/has_many_association.rb +++ b/activerecord/lib/active_record/associations/has_many_association.rb @@ -20,7 +20,7 @@ module ActiveRecord if @options[:finder_sql] records = @association_class.find_by_sql(@finder_sql) else - sql = @finder_sql + sql = @finder_sql.dup sql << " AND #{sanitize_sql(runtime_conditions)}" if runtime_conditions orderings ||= @options[:order] records = @association_class.find_all(sql, orderings, limit, joins) |