instance method
define_helpers_module
Ruby on Rails 7.1.6
Since v6.1.7.10 PrivateSignature
define_helpers_module(klass, helpers = nil)
No documentation comment.
Parameters
-
klassreq -
helpersopt = nil
Source
# 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
Defined in actionpack/lib/abstract_controller/helpers.rb line 239
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in AbstractController::Helpers::ClassMethods