Update comments for helper method generation

Follow up to #50596.
This commit is contained in:
Ryuta Kamizono 2024-04-22 22:13:30 +09:00
parent edbe4672e6
commit 7db95ced41
2 changed files with 4 additions and 4 deletions

View File

@ -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}(...)

View File

@ -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