helper LayoutHelper
does include LayoutHelper
, but it is included directly in the template class.
while include LayoutHelper
, the module is included in the controller class.
You could check the source of helper
:
# File actionpack/lib/abstract_controller/helpers.rb, line 93
def helper(*args, &block)
modules_for_helpers(args).each do |mod|
add_template_helper(mod)
end
_helpers.module_eval(&block) if block_given?
end