Module: RailsDevelopmentBoost::ViewHelpersPatch

Defined in:
lib/rails_development_boost/view_helpers_patch.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.apply!Object



3
4
5
# File 'lib/rails_development_boost/view_helpers_patch.rb', line 3

def self.apply!
  AbstractController::Helpers::ClassMethods.send :include, self
end

.included(base) ⇒ Object



13
14
15
# File 'lib/rails_development_boost/view_helpers_patch.rb', line 13

def self.included(base)
  base.alias_method_chain :add_template_helper, :const_association_tracking
end

Instance Method Details

#add_template_helper_with_const_association_tracking(helper_module) ⇒ Object

we need to explicitly associate helpers to their including controllers/mailers



8
9
10
11
# File 'lib/rails_development_boost/view_helpers_patch.rb', line 8

def add_template_helper_with_const_association_tracking(helper_module)
  ActiveSupport::Dependencies.add_explicit_dependency(helper_module, self)
  add_template_helper_without_const_association_tracking(helper_module)
end