method
define_helpers_module
v7.1.3.4 -
Show latest stable
- Class:
AbstractController::Helpers::ClassMethods
define_helpers_module(klass, helpers = nil)private
No documentation available.
# File actionpack/lib/abstract_controller/helpers.rb, line 239
def define_helpers_module(klass, helpers = nil)
# In some tests inherited is called explicitly. In that case, just
# return the module from the first time it was defined
return klass.const_get(:HelperMethods) if klass.const_defined?(:HelperMethods, false)
mod = Module.new
klass.const_set(:HelperMethods, mod)
mod.include(helpers) if helpers
mod
end