Sha256: 17832e29b6a2728f3653ae949a0fc7513b2bac98d3e2524828d3f3027183f2a1

Contents?: true

Size: 838 Bytes

Versions: 7

Compression:

Stored size: 838 Bytes

Contents

require 'curupira/rails/routes'

module Curupira
  class Engine < Rails::Engine
    config.generators do |g|
      g.test_framework      :rspec,        :fixture => false
      g.fixture_replacement :factory_girl, :dir => 'spec/factories'
      g.assets false
      g.helper false
    end

    initializer "curupira.load_app_instance_data" do |app|
      Curupira.setup do |config|
        config.app_root = app.root
      end
    end

    initializer "curupira.load_static_assets" do |app|
      app.middleware.use ::ActionDispatch::Static, "#{root}/public"
    end

    initializer 'curupira.action_controller' do |app|
      ActiveSupport.on_load :action_controller do
        helper Curupira::RelationshipSelectOptionsHelper
        include Curupira::Authorizer
        helper_method :has_authorization_for
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
curupira-0.1.7 lib/curupira/rails.rb
curupira-0.1.6 lib/curupira/rails.rb
curupira-0.1.4 lib/curupira/rails.rb
curupira-0.1.3 lib/curupira/rails.rb
curupira-0.1.2 lib/curupira/rails.rb
curupira-0.1.1 lib/curupira/rails.rb
curupira-0.1.0 lib/curupira/rails.rb