aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/association_preload.rb2
-rwxr-xr-xactiverecord/lib/active_record/associations.rb4
-rwxr-xr-xactiverecord/lib/active_record/base.rb2
3 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/association_preload.rb b/activerecord/lib/active_record/association_preload.rb
index 95bbaf00cf..1f5217191c 100644
--- a/activerecord/lib/active_record/association_preload.rb
+++ b/activerecord/lib/active_record/association_preload.rb
@@ -378,7 +378,7 @@ module ActiveRecord
def interpolate_sql_for_preload(sql)
- instance_eval("%@#{sql.gsub('@', '\@')}@")
+ instance_eval("%@#{sql.gsub('@', '\@')}@", __FILE__, __LINE__)
end
def append_conditions(reflection, preload_options)
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index f23d881c7b..5b0ba86308 100755
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -1461,7 +1461,7 @@ module ActiveRecord
before_destroy(method_name)
module_eval(
- "#{reflection.class_name}.send(:attr_readonly,\"#{cache_column}\".intern) if defined?(#{reflection.class_name}) && #{reflection.class_name}.respond_to?(:attr_readonly)"
+ "#{reflection.class_name}.send(:attr_readonly,\"#{cache_column}\".intern) if defined?(#{reflection.class_name}) && #{reflection.class_name}.respond_to?(:attr_readonly)", __FILE__, __LINE__
)
end
@@ -2130,7 +2130,7 @@ module ActiveRecord
end
def interpolate_sql(sql)
- instance_eval("%@#{sql.gsub('@', '\@')}@")
+ instance_eval("%@#{sql.gsub('@', '\@')}@", __FILE__, __LINE__)
end
end
end
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 1b76f357e3..aa2826fb33 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -1786,7 +1786,7 @@ module ActiveRecord #:nodoc:
# Interpolate custom SQL string in instance context.
# Optional record argument is meant for custom insert_sql.
def interpolate_sql(sql, record = nil)
- instance_eval("%@#{sql.gsub('@', '\@')}@")
+ instance_eval("%@#{sql.gsub('@', '\@')}@", __FILE__, __LINE__)
end
# Instantiates objects for all attribute classes that needs more than one constructor parameter. This is done