Sha256: 2063181b4881d53d5fb0eb9201cef1bae8113a8f127b5c60a59bb0bd0dc59e6c

Contents?: true

Size: 904 Bytes

Versions: 11

Compression:

Stored size: 904 Bytes

Contents

require "adeia/controller_methods"
require "adeia/helpers/sessions_helper"
require "adeia/helpers/user_helper"
require "adeia/exceptions"

module Adeia
  class Engine < ::Rails::Engine
    require 'snaptable'

    isolate_namespace Adeia

    config.generators do |g|
      g.test_framework :rspec
      g.assets false
      g.helper false
      g.factory_girl false
    end

    initializer 'Adeia.requirements' do |app|
      begin
        User
      rescue NameError
        raise MissingUserModel
      end
    end

    initializer 'Adeia.user_addictions' do |app|
      User.send :include, Adeia::Helpers::UserHelper
    end

    initializer 'Adeia.controller_methods' do |app|
      ActionController::Base.send :include, Adeia::ControllerMethods
    end

    initializer 'Adeia.sessions_helper' do |app|
      ActionController::Base.send :include, Adeia::Helpers::SessionsHelper
    end

  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
adeia-0.11.3 lib/adeia/engine.rb
adeia-0.11.2 lib/adeia/engine.rb
adeia-0.11.0 lib/adeia/engine.rb
adeia-0.10.5 lib/adeia/engine.rb
adeia-0.10.4 lib/adeia/engine.rb
adeia-0.10.3 lib/adeia/engine.rb
adeia-0.10.2 lib/adeia/engine.rb
adeia-0.10.1 lib/adeia/engine.rb
adeia-0.10.0 lib/adeia/engine.rb
adeia-0.9.2 lib/adeia/engine.rb
adeia-0.9.1 lib/adeia/engine.rb