Class: Metaslug::Hooks

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

Class Method Summary collapse

Class Method Details

.initObject



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/metaslug/hooks.rb', line 3

def self.init
  ActiveSupport.on_load(:action_controller) do
    require 'metaslug/controllers/action_controller_extension'
    ::ActionController::Base.send :include, Metaslug::ActionControllerExtension
  end

  ActiveSupport.on_load(:action_view) do
    require 'metaslug/helpers/action_view_extension'
    ::ActionView::Base.send :include, Metaslug::ActionViewExtension
  end
end