Sha256: 28e23fecf2733f1c6c56380e2dca8d0f1ff35d27a5ba6c03b0dc3bc6f4993f4c

Contents?: true

Size: 685 Bytes

Versions: 2

Compression:

Stored size: 685 Bytes

Contents

require 'sandbox_assets/settings'

module SandboxAssets
  class Engine < Rails::Engine
    config.autoload_paths << File.expand_path("../lib/", __FILE__)
    config.sandbox_assets = Settings.new

    initializer "sandbox_assets" do |app|
      config = app.config.sandbox_assets
      app.config.assets.paths.concat config.assets_paths
    end

    config.after_initialize do
      ActiveSupport.on_load(:action_view) do
        default_checker = ActionView::Base.precompiled_asset_checker
        ActionView::Base.precompiled_asset_checker = -> logical_path do
          default_checker[logical_path] || Thread.current[:skip_precompiled_check]
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails-sandbox-assets-0.2.1 lib/sandbox_assets/engine.rb
rails-sandbox-assets-0.2.0 lib/sandbox_assets/engine.rb