Permalink
Browse files

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

[#6388 state:resolved]
  • Loading branch information...
1 parent d729e5f commit e6369bc9e97d0f1e5583725cd9f684bbe4fca3e1 @drogus drogus committed Feb 9, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 railties/lib/rails/application.rb
@@ -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

0 comments on commit e6369bc

Please sign in to comment.