Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Application's assets should have higher priority than engine's ones

[#6388 state:resolved]
  • Loading branch information...
commit e6369bc9e97d0f1e5583725cd9f684bbe4fca3e1 1 parent d729e5f
Piotr Sarnacki drogus authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 railties/lib/rails/application.rb
5 railties/lib/rails/application.rb
View
@@ -149,7 +149,10 @@ def default_middleware_stack
require "action_dispatch/http/rack_cache" if rack_cache
middleware.use ::Rack::Cache, rack_cache if rack_cache
- middleware.use ::ActionDispatch::Static, config.static_asset_paths if config.serve_static_assets
+ if config.serve_static_assets
+ asset_paths = ActiveSupport::OrderedHash[config.static_asset_paths.to_a.reverse]
+ middleware.use ::ActionDispatch::Static, asset_paths
+ end
middleware.use ::Rack::Lock unless config.allow_concurrency
middleware.use ::Rack::Runtime
middleware.use ::Rails::Rack::Logger
Please sign in to comment.
Something went wrong with that request. Please try again.