Sha256: 5aea11bba10241186f47fe15cab05b7ac102bf9296826d561b0d4bc3f6a62ff1

Contents?: true

Size: 832 Bytes

Versions: 5

Compression:

Stored size: 832 Bytes

Contents

require "rails"
require "mountain_view"
require "mountain_view/component"

module MountainView
  class Engine < ::Rails::Engine
    isolate_namespace MountainView

    initializer "mountain_view.assets" do |app|
      Rails.application.config.assets.paths << app.root.join("app", "components")
      Rails.application.config.assets.precompile += %w( mountain_view/styleguide.css
                                                        mountain_view/styleguide.js )
    end

    initializer "mountain_view.append_view_paths" do |app|
      ActiveSupport.on_load :action_controller do
        append_view_path app.root.join("app", "components")
      end
    end

    initializer "mountain_view.add_helpers" do
      ActiveSupport.on_load :action_controller do
        helper MountainView::ComponentHelper
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mountain_view-0.6.0 lib/mountain_view/engine.rb
mountain_view-0.5.0 lib/mountain_view/engine.rb
mountain_view-0.4.3 lib/mountain_view/engine.rb
mountain_view-0.4.2 lib/mountain_view/engine.rb
mountain_view-0.4.1 lib/mountain_view/engine.rb