Sha256: 9be8b596abdaa59bc502bed785c7d35e58b7b16776cc5f3744cef3bc441bf016

Contents?: true

Size: 606 Bytes

Versions: 7

Compression:

Stored size: 606 Bytes

Contents

module HighVoltage
  class Engine < Rails::Engine
    initializer "Set up default parent engine" do |app|
      HighVoltage.parent_engine ||= Rails.application
    end

    initializer "Require concerns path" do |app|
      concerns_path = "app/controllers/concerns"

      unless app.paths.keys.include?(concerns_path)
        app.paths.add(concerns_path)
      end
    end

    initializer "Require for Rails 3" do |app|
      if defined?(Rails) && Rails::VERSION::MAJOR == 3
        require "concerns/high_voltage/static_page"
        require "high_voltage/pages_controller"
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
high_voltage-3.1.2 lib/high_voltage/engine.rb
high_voltage-3.1.1 lib/high_voltage/engine.rb
high_voltage-3.1.0 lib/high_voltage/engine.rb
high_voltage-3.0.0 lib/high_voltage/engine.rb
high_voltage-2.4.0 lib/high_voltage/engine.rb
high_voltage-2.3.0 lib/high_voltage/engine.rb
high_voltage-2.2.1 lib/high_voltage/engine.rb