Sha256: e7e93f9f2c8f33d3b15dc287ad3b239f485c7859f3056c03e699a0194197a896

Contents?: true

Size: 591 Bytes

Versions: 1

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

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

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fuel-0.3.31 lib/fuel/engine.rb