Sha256: 64d55fc31360e5b1f3e7ce5f5f1b36b8c693b6903066bc4da59a8ee499173a4b

Contents?: true

Size: 1.07 KB

Versions: 3

Compression:

Stored size: 1.07 KB

Contents

require 'active_support/all' # TODO: want duration

require 'ndr_ui/engine'

require 'will_paginate'
require 'will_paginate/array'

require 'jquery-rails'

module NdrError
  # Engine configuration goes here; hook in to the host app.
  class Engine < ::Rails::Engine
    isolate_namespace NdrError

    # Hook into host app's asset pipeline
    initializer 'ndr_error.assets.precompile' do |app|
      app.config.assets.precompile += %w[
        ndr_error/ndr_error.css
        ndr_error/ndr_error.js
        ndr_error/bootstrap/glyphicons-halflings-regular*
      ]
    end

    # Extract context filtering from the host application
    initializer 'ndr_error.set_default_filtering' do |app|
      NdrError.filtered_parameters.concat app.config.filter_parameters
    end

    # Ensure helpers remain visible in development...
    # See:
    #
    #   * http://stackoverflow.com/questions/{9809787,26645033,12191822}
    #   * https://robots.thoughtbot.com/tips-for-writing-your-own-rails-engine
    #
    config.to_prepare do
      ApplicationController.helper(ApplicationHelper)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ndr_error-2.2.0 lib/ndr_error/engine.rb
ndr_error-2.1.0 lib/ndr_error/engine.rb
ndr_error-2.0.3 lib/ndr_error/engine.rb