Sha256: f72d9c8d16465b7ed612b504d27cf27768e3253b0c48404b5c7c47b2695786b5

Contents?: true

Size: 591 Bytes

Versions: 11

Compression:

Stored size: 591 Bytes

Contents

module Fuel
  class Engine < ::Rails::Engine

    # ISOLATE NAMESPACE ONLY FOR MODELS
    mod = Fuel
    engine_name(generate_railtie_name(mod.name))
    unless mod.respond_to?(:railtie_namespace)
      name, railtie = engine_name, self
      mod.singleton_class.instance_eval do
        unless mod.respond_to?(:table_name_prefix)
          define_method(:table_name_prefix) { "#{name}_" }
        end
      end
    end

    initializer :fuel do
      if defined?(ActiveAdmin)
        ActiveAdmin.application.load_paths += Dir[File.dirname(__FILE__) + '/admin']
      end
    end

  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
fuel-0.4.8 lib/fuel/engine.rb
fuel-0.4.7 lib/fuel/engine.rb
fuel-0.4.6 lib/fuel/engine.rb
fuel-0.4.5 lib/fuel/engine.rb
fuel-0.4.4 lib/fuel/engine.rb
fuel-0.4.3 lib/fuel/engine.rb
fuel-0.4.2 lib/fuel/engine.rb
fuel-0.4.1 lib/fuel/engine.rb
fuel-0.3.34 lib/fuel/engine.rb
fuel-0.3.33 lib/fuel/engine.rb
fuel-0.3.32 lib/fuel/engine.rb