Sha256: 12eecf64faae5d274280d01e5ebb963fc1933939d564f05d7375f9fe3c6d5b87

Contents?: true

Size: 574 Bytes

Versions: 1

Compression:

Stored size: 574 Bytes

Contents

require 'rails'
require 'transit'

module Transit
  class Engine < Rails::Engine
    isolate_namespace Transit
    
    ActiveSupport.on_load(:after_initialize) do
      Transit::CONTROLLERS.dup.uniq.each do |klass|
        controller_klass = "#{klass.classify.pluralize}Controller"
        unless Transit.const_defined?(controller_klass)
          Transit.const_set(controller_klass, Class.new(Transit::PackagesController))
        end
      end
    end
        
    ActiveSupport.on_load(:action_controller) do
      helper Transit::Engine.helpers
    end
      
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
transit-0.0.1 lib/transit/rails/engine.rb