Sha256: d48bc474ffcda31b56a3e1717e5c318f47c7d5aba66ee5adfb7f88c8b0876699

Contents?: true

Size: 712 Bytes

Versions: 2

Compression:

Stored size: 712 Bytes

Contents

module AppfluxRuby
  module Rails
    class Railtie < ::Rails::Railtie
      initializer('appflux_ruby.middleware') do |app|
        if ::Rails.version =~ /\A5\./
          app.config.middleware.insert_after(
            ActionDispatch::DebugExceptions, AppfluxRuby::Rack::Middleware
          )
        else
          app.config.middleware.insert_after(
            ActionDispatch::DebugExceptions, 'AppfluxRuby::Rack::Middleware'
          )
        end
      end

      initializer('appflux_ruby.active_record') do
        ActiveSupport.on_load(:active_record) do
          require 'appflux_ruby/rails/active_record'
          include AppfluxRuby::Rails::ActiveRecord
        end
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
appflux_ruby-0.1.2 lib/appflux_ruby/rails/railtie.rb
appflux_ruby-0.1.1 lib/appflux_ruby/rails/railtie.rb