Sha256: 9cf37c0c690beb9c91d49e040a9a884b25253f7a986b209dd71f6acb89350a78

Contents?: true

Size: 796 Bytes

Versions: 5

Compression:

Stored size: 796 Bytes

Contents

require 'rails'

require 'stepper/engine'
require 'stepper/controllers/controller_additions'
require 'stepper/controllers/controller_resource'
require 'stepper/exceptions'
require 'stepper/models/active_record_additions'
require 'stepper/helper/action_view_additions'

module Stepper
  class Railtie < ::Rails::Railtie #:nodoc:
    initializer 'stepper' do |app|
      ActiveSupport.on_load(:active_record) do
        ::ActiveRecord::Base.send :include, Stepper::ActiveRecordAdditions
      end

      ActiveSupport.on_load(:action_controller) do
        ::ActionController::Base.send :include, Stepper::ControllerAdditions
      end

      ActiveSupport.on_load(:action_view) do
        ::ActionView::Base.send :include, Stepper::ActionViewAdditions::InstanceMethods
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
stepper-0.2.0 lib/stepper/railtie.rb
stepper-0.1.0 lib/stepper/railtie.rb
stepper-0.0.4 lib/stepper/railtie.rb
stepper-0.0.3 lib/stepper/railtie.rb
stepper-0.0.1 lib/stepper/railtie.rb