Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

To allow proper fisting of stack trace

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information...
commit 0c37bf8f915cad47e8711f525c220ceed95e84ee 1 parent 4a8a620
@spastorino spastorino authored jeremy committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 activerecord/lib/active_record/relation/query_methods.rb
View
6 activerecord/lib/active_record/relation/query_methods.rb
@@ -10,7 +10,7 @@ module QueryMethods
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 @@ def #{query_method}(*args, &block)
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 @@ def #{query_method}(*args, &block)
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?
Please sign in to comment.
Something went wrong with that request. Please try again.