Method: AbstractController::Helpers::ClassMethods#clear_helpers

Defined in:
lib/abstract_controller/helpers.rb

#clear_helpersObject

Clears up all existing helpers in this class, only keeping the helper with the same name as this class.



209
210
211
212
213
214
215
216
# File 'lib/abstract_controller/helpers.rb', line 209

def clear_helpers
  inherited_helper_methods = _helper_methods
  self._helpers = Module.new
  self._helper_methods = Array.new

  inherited_helper_methods.each { |meth| helper_method meth }
  default_helper_module! unless anonymous?
end