mirror of https://github.com/rails/rails
parent
edbe4672e6
commit
7db95ced41
|
@ -131,8 +131,8 @@ module AbstractController
|
|||
file, line = location.path, location.lineno
|
||||
|
||||
methods.each do |method|
|
||||
# def current_user(*args, &block)
|
||||
# controller.send(:'current_user', *args, &block)
|
||||
# def current_user(...)
|
||||
# controller.send(:'current_user', ...)
|
||||
# end
|
||||
_helpers_for_modification.class_eval <<~ruby_eval.lines.map(&:strip).join(";"), file, line
|
||||
def #{method}(...)
|
||||
|
|
|
@ -171,8 +171,8 @@ module ActionView
|
|||
# Almost a duplicate from ActionController::Helpers
|
||||
methods.flatten.each do |method|
|
||||
_helpers_for_modification.module_eval <<~end_eval, __FILE__, __LINE__ + 1
|
||||
def #{method}(...) # def current_user(*args, &block)
|
||||
_test_case.send(:'#{method}', ...) # _test_case.send(:'current_user', *args, &block)
|
||||
def #{method}(...) # def current_user(...)
|
||||
_test_case.send(:'#{method}', ...) # _test_case.send(:'current_user', ...)
|
||||
end # end
|
||||
end_eval
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue