Sha256: 2d03eb8513c9f5866dc10622b7972d2b417692310504672230fd7d5de70055fd

Contents?: true

Size: 706 Bytes

Versions: 1

Compression:

Stored size: 706 Bytes

Contents

module Localtower
  class Engine < ::Rails::Engine
    isolate_namespace Localtower

    initializer 'localtower.add_static_assets', before: :build_middleware_stack do |app|
      app.config.middleware.use Rack::Deflater
      app.config.middleware.use ::ActionDispatch::Static, "#{root}/public"
      # Later: have a better assets pipeline to be able to version and cache assets forever
      # app.config.middleware.use ::ActionDispatch::Static, "#{root}/public", headers: { "Cache-Control" => "public, max-age=31536000" }
    end

    initializer "localtower.assets.precompile" do |app|
      app.config.assets.precompile += ["localtower/application.css", "localtower/application.js"]
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
localtower-2.0.1 lib/localtower/engine.rb