Sha256: 057cdb5197687979c6a6806f566a6d7ff799b34adc2fca90375290b621d67daa

Contents?: true

Size: 974 Bytes

Versions: 4

Compression:

Stored size: 974 Bytes

Contents

# -*- coding: utf-8 -*-

require 'rails'

class RailsDataExplorer

  # Responsibilities:
  #  * Tie RailsDataExplorer into a Rails app
  #  * Initialize ActionViewExtension
  #  * Tell rails which assets to precompile
  #
  # Collaborators:
  #  * ActiveSupport
  #  * RailsDataExplorer
  #
  class Engine < ::Rails::Engine

    # It's an engine so that we can add javascript and image assets
    # to the asset pipeline.

    isolate_namespace RailsDataExplorer

    # ActiveSupport.on_load :action_controller do
    #   include RailsDataExplorer::ActionControllerExtension
    # end

    ActiveSupport.on_load :action_view do
      include RailsDataExplorer::ActionViewExtension
    end

    # ActiveSupport.on_load :active_record do
    #   extend RailsDataExplorer::ActiveRecordExtension
    # end

    initializer "rails-data-explorer.assets.precompile" do |app|
      app.config.assets.precompile += %w(
        multiple_bivariate_small.png
      )
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rails-data-explorer-1.0.4 lib/rails_data_explorer/engine.rb
rails-data-explorer-1.0.3 lib/rails_data_explorer/engine.rb
rails-data-explorer-1.0.2 lib/rails_data_explorer/engine.rb
rails-data-explorer-1.0.1 lib/rails_data_explorer/engine.rb