diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-05-14 14:08:46 -0300 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-05-14 10:36:59 -0700 |
commit | 0c37bf8f915cad47e8711f525c220ceed95e84ee (patch) | |
tree | 15f549f3e1bbb57d6503b5f58ee3d9a66a32f73a /activerecord/lib/active_record/relation/query_methods.rb | |
parent | 4a8a62058a81ba9c0ec12adc772adbdca4c900a5 (diff) | |
download | rails-0c37bf8f915cad47e8711f525c220ceed95e84ee.tar.gz rails-0c37bf8f915cad47e8711f525c220ceed95e84ee.tar.bz2 rails-0c37bf8f915cad47e8711f525c220ceed95e84ee.zip |
To allow proper fisting of stack trace
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
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 8d8bb659e1..6782554854 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, __FILE__ + class_eval <<-CEVAL, __FILE__, __LINE__ + 1 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, __FILE__ + class_eval <<-CEVAL, __FILE__, __LINE__ + 1 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, __FILE__ + class_eval <<-CEVAL, __FILE__, __LINE__ + 1 def #{query_method}(value = true, &block) new_relation = clone new_relation.send(:apply_modules, Module.new(&block)) if block_given? |