Permalink
Browse files

Only apply app/assets/public middleware if config.serve_static_assets

  • Loading branch information...
1 parent 142d044 commit 0d8112d74d9bbfda76e49c4f670ec2ba7bb8eb8b @davidjrice committed Mar 13, 2012
Showing with 1 addition and 5 deletions.
  1. +1 −5 railties/lib/rails/application.rb
@@ -234,14 +234,10 @@ def default_middleware_stack
end
if config.serve_static_assets
+ middleware.use ::ActionDispatch::Static, "app/assets/public", false if Rails.env.development?
middleware.use ::ActionDispatch::Static, paths["public"].first, config.static_cache_control
end
- if Rails.env.development?
- # Serve static assets from app/assets/public
- middleware.use ::ActionDispatch::Static, "app/assets/public", false
- end
-
middleware.use ::Rack::Lock unless config.allow_concurrency
middleware.use ::Rack::Runtime
middleware.use ::Rack::MethodOverride unless config.middleware.http_only?

0 comments on commit 0d8112d

Please sign in to comment.