Sha256: 36eb9cf70bce808ff40adfd779d4ef385643174058e72470bb07357ab826fc1d

Contents?: true

Size: 711 Bytes

Versions: 4

Compression:

Stored size: 711 Bytes

Contents

require 'rails'

module Roadie
  module Rails
    class Railtie < ::Rails::Railtie
      config.roadie = Roadie::Rails::Options.new

      initializer "roadie-rails.setup" do |app|
        config.roadie.asset_providers = [
          Roadie::FilesystemProvider.new(::Rails.root.join("public").to_s),
        ]

        # Saying config.assets.enabled here does not work in Rails 3.1-3.2, but
        # APP.config.assets work. There is a difference between "config" and
        # "app.config" on those versions.
        if app.config.respond_to?(:assets) && app.config.assets.enabled != false
          config.roadie.asset_providers << AssetPipelineProvider.new(app.assets)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
roadie-rails-1.0.2 lib/roadie/rails/railtie.rb
roadie-rails-1.0.1 lib/roadie/rails/railtie.rb
roadie-rails-1.0.0 lib/roadie/rails/railtie.rb
roadie-rails-1.0.0.pre1 lib/roadie/rails/railtie.rb