diff options
author | José Valim <jose.valim@gmail.com> | 2010-04-08 12:52:37 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-04-08 12:52:37 +0200 |
commit | 4e92134dfa15ae198c714b85376838ffec5a7773 (patch) | |
tree | 043a10da476019c7cb53934eb40326ea8a57b34e /railties/lib/rails | |
parent | 336cb3c0bf3d38400f6c774ca78376117b899985 (diff) | |
download | rails-4e92134dfa15ae198c714b85376838ffec5a7773.tar.gz rails-4e92134dfa15ae198c714b85376838ffec5a7773.tar.bz2 rails-4e92134dfa15ae198c714b85376838ffec5a7773.zip |
Fix a bug in ActionDispatch::Static where Rails cannot find assets if started in another directory which is not the RAILS_ROOT.
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index f9f47ef679..7ce3494fa6 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -137,7 +137,7 @@ module Rails def default_middleware_stack ActionDispatch::MiddlewareStack.new.tap do |middleware| - middleware.use('::ActionDispatch::Static', lambda { Rails.public_path }, :if => lambda { serve_static_assets }) + middleware.use('::ActionDispatch::Static', lambda { paths.public.to_a.first }, :if => lambda { serve_static_assets }) middleware.use('::Rack::Lock', :if => lambda { !allow_concurrency }) middleware.use('::Rack::Runtime') middleware.use('::Rails::Rack::Logger') |