Sha256: 21a68e79bd99a9e4599f8ea6e2ab876bdbf042f3013f80354ffa8bc4721fbce4
Contents?: true
Size: 649 Bytes
Versions: 5
Compression:
Stored size: 649 Bytes
Contents
# encoding: utf-8 require 'action_controller' require 'action_view' module Loaf if defined? Rails::Railtie class Railtie < Rails::Railtie initializer "loaf.extend_action_controller_base" do |app| ActiveSupport.on_load :action_controller do Loaf::Railtie.insert_controller Loaf::Railtie.insert_view end end end end class Railtie class << self def insert_view ActionController::Base.helper Loaf::ViewExtensions end def insert_controller ActionController::Base.send :include, Loaf::ControllerExtensions end end end # Railtie end # Loaf
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
loaf-0.5.0 | lib/loaf/railtie.rb |
loaf-0.4.0 | lib/loaf/railtie.rb |
loaf-0.3.0 | lib/loaf/railtie.rb |
loaf-0.2.1 | lib/loaf/railtie.rb |
loaf-0.2.0 | lib/loaf/railtie.rb |