Class: InheritedResources::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/inherited_resources_views.rb

Overview

Clears up all existing helpers in this class, only keeping the helper with the same name as this class, ApplicationHelper and InheritedResourcesViews::Helper.

By default, in Rails 3, if you derive your class from ActionController::Base, all helpers will be included. Since InheritedResourcesViews::Helper module relies on different helpers using the same method names, this is a very bad thing.

Class Method Summary collapse

Class Method Details

.inherit_resources(base) ⇒ Object



19
20
21
22
# File 'lib/inherited_resources_views.rb', line 19

def self.inherit_resources(base)
  inherit_resources_original(base)
  include_helpers(base)
end

.inherited(base) ⇒ Object



24
25
26
27
# File 'lib/inherited_resources_views.rb', line 24

def self.inherited(base)
  super
  include_helpers(base)
end