Sha256: ba1b3f8491dd390acc8275046529afcfd21318f98c70f308bee70a1dfa20680b
Contents?: true
Size: 752 Bytes
Versions: 3
Compression:
Stored size: 752 Bytes
Contents
# encoding: utf-8 require 'action_controller' require 'action_view' module Tytus if defined? Rails::Railtie class Railtie < Rails::Railtie initializer 'tytus.view_extensions' do ActiveSupport.on_load :action_view do Tytus::Railtie.insert_view end end initializer 'tytus.controller_extensions' do ActiveSupport.on_load :action_controller do Tytus::Railtie.insert_controller end end end end class Railtie class << self def insert_view ::ActionView::Base.send :include, Tytus::ViewExtensions end def insert_controller ::ActionController::Base.send :include, Tytus::ControllerExtensions end end end end # Tytus
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tytus-0.1.0 | lib/tytus/railtie.rb |
tytus-0.0.2 | lib/tytus/railtie.rb |
tytus-0.0.1 | lib/tytus/railtie.rb |