Sha256: dade97099035a38960d63c5539b1a82bd74867033b45639c8195500423a437a5

Contents?: true

Size: 613 Bytes

Versions: 3

Compression:

Stored size: 613 Bytes

Contents

# TODO: Only load when needed (enables asset pipeline)
require 'sass-rails'

module NetworkExecutive

  class Engine < Rails::Engine
    engine_name :network_executive

    isolate_namespace NetworkExecutive

    initializer 'network_executive.eager_load_channels' do |app|
      eager_load_models_in 'channels', app
    end

    initializer 'network_executive.eager_load_programs' do |app|
      eager_load_models_in 'programs', app
    end

  private

    def eager_load_models_in( sub_path, app )
      Dir[ File.join(app.root, 'app', sub_path, '*') ].each do |c|
        require c
      end
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
network_executive-0.0.4 lib/network_executive/engine.rb
network_executive-0.0.3 lib/network_executive/engine.rb
network_executive-0.0.2 lib/network_executive/engine.rb