method

define_helpers_module

Importance_0
v7.1.3.4 - Show latest stable - 0 notes - Class: AbstractController::Helpers::ClassMethods
define_helpers_module(klass, helpers = nil) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide 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
Register or log in to add new notes.