Sha256: 5eebf2c9600768d880991d75ad629429cceb4370d4e8b4d4913cf7ec56500f4b

Contents?: true

Size: 1.75 KB

Versions: 28

Compression:

Stored size: 1.75 KB

Contents

module ActiveScaffold
  class Engine < ::Rails::Engine
    initializer 'active_scaffold.action_controller' do
      ActiveSupport.on_load :action_controller do
        include ActiveScaffold::Core
        include ActiveScaffold::DelayedSetup if ActiveScaffold.delayed_setup
        include ActiveScaffold::RespondsToParent
        include ActiveScaffold::Helpers::ControllerHelpers
        include ActiveScaffold::ActiveRecordPermissions::ModelUserAccess::Controller
        ActiveScaffold::Bridges.prepare_all
      end
    end

    initializer 'active_scaffold.action_view' do
      ActiveSupport.on_load :action_view do
        include ActiveScaffold::Helpers::ViewHelpers
      end
    end

    initializer 'active_scaffold.active_record' do
      ActiveSupport.on_load :active_record do
        include ActiveScaffold::ActiveRecordPermissions::ModelUserAccess::Model
        module ActiveRecord::Associations
          Association.send :include, ActiveScaffold::Tableless::Association
          CollectionAssociation.send :include, ActiveScaffold::Tableless::CollectionAssociation
          SingularAssociation.send :include, ActiveScaffold::Tableless::SingularAssociation
        end
        module ActiveRecord::ConnectionAdapters
          AbstractAdapter.send :include, ActiveScaffold::ConnectionAdapters::AbstractAdapter
          if defined?(PostgreSQLAdapter)
            PostgreSQLAdapter.send :include, ActiveScaffold::ConnectionAdapters::PostgreSQLAdapter
          end
          if defined?(SQLServerAdapter)
            SQLServerAdapter.send :include, ActiveScaffold::ConnectionAdapters::SQLServerAdapter
          end
        end
      end
    end

    initializer 'active_scaffold.assets' do
      config.assets.precompile << 'active_scaffold/indicator.gif'
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
active_scaffold-3.6.20 lib/active_scaffold/engine.rb
active_scaffold-3.6.19 lib/active_scaffold/engine.rb
active_scaffold-3.6.17 lib/active_scaffold/engine.rb
active_scaffold-3.6.15 lib/active_scaffold/engine.rb
active_scaffold-3.6.14 lib/active_scaffold/engine.rb
active_scaffold-3.6.13 lib/active_scaffold/engine.rb
active_scaffold-3.6.12 lib/active_scaffold/engine.rb
active_scaffold-3.6.11.1 lib/active_scaffold/engine.rb
active_scaffold-3.6.11 lib/active_scaffold/engine.rb
active_scaffold-3.6.10 lib/active_scaffold/engine.rb
active_scaffold-3.6.9 lib/active_scaffold/engine.rb
active_scaffold-3.6.8 lib/active_scaffold/engine.rb
active_scaffold-3.6.6 lib/active_scaffold/engine.rb
active_scaffold-3.6.5 lib/active_scaffold/engine.rb
active_scaffold-3.6.4.1 lib/active_scaffold/engine.rb
active_scaffold-3.6.4 lib/active_scaffold/engine.rb
active_scaffold-3.6.3 lib/active_scaffold/engine.rb
active_scaffold-3.6.2 lib/active_scaffold/engine.rb
active_scaffold-3.6.1 lib/active_scaffold/engine.rb
active_scaffold-3.6.0 lib/active_scaffold/engine.rb