diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2010-04-10 22:39:10 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-04-10 22:39:10 -0700 |
commit | 6d29f9789e9a7211ec2890f46caf6cb2e5530bbe (patch) | |
tree | ee8e568e1a6e1521d2bbb4f38f732c6e4238be2b /activerecord/lib/active_record/relation/query_methods.rb | |
parent | 86dda361e2363e27d39cc66d490335d9c7126c7b (diff) | |
download | rails-6d29f9789e9a7211ec2890f46caf6cb2e5530bbe.tar.gz rails-6d29f9789e9a7211ec2890f46caf6cb2e5530bbe.tar.bz2 rails-6d29f9789e9a7211ec2890f46caf6cb2e5530bbe.zip |
Fix evals missing context
Diffstat (limited to 'activerecord/lib/active_record/relation/query_methods.rb')
-rw-r--r-- | activerecord/lib/active_record/relation/query_methods.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index 2fbccb69db..09332418d5 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -10,7 +10,7 @@ module ActiveRecord attr_accessor :"#{query_method}_values" next if [:where, :having].include?(query_method) - class_eval <<-CEVAL + class_eval <<-CEVAL, __FILE__ def #{query_method}(*args, &block) new_relation = clone new_relation.send(:apply_modules, Module.new(&block)) if block_given? @@ -22,7 +22,7 @@ module ActiveRecord end [:where, :having].each do |query_method| - class_eval <<-CEVAL + class_eval <<-CEVAL, __FILE__ def #{query_method}(*args, &block) new_relation = clone new_relation.send(:apply_modules, Module.new(&block)) if block_given? @@ -36,7 +36,7 @@ module ActiveRecord ActiveRecord::Relation::SINGLE_VALUE_METHODS.each do |query_method| attr_accessor :"#{query_method}_value" - class_eval <<-CEVAL + class_eval <<-CEVAL, __FILE__ def #{query_method}(value = true, &block) new_relation = clone new_relation.send(:apply_modules, Module.new(&block)) if block_given? |