diff options
author | Gonçalo Silva <goncalossilva@gmail.com> | 2011-04-17 17:08:49 +0100 |
---|---|---|
committer | Gonçalo Silva <goncalossilva@gmail.com> | 2011-04-17 17:08:49 +0100 |
commit | 1c2b2233c3a7ec76c0a0eddf5b8be45c489be133 (patch) | |
tree | 56f2b767c3a4f1f14c51606bf2cbb714a98c5f89 /railties/lib/rails/application.rb | |
parent | 8d558cb1b069410c8f693295c9c4e2ffc9661e06 (diff) | |
parent | b6843f22ac42b503f6b8ac00105ca0679049be7d (diff) | |
download | rails-1c2b2233c3a7ec76c0a0eddf5b8be45c489be133.tar.gz rails-1c2b2233c3a7ec76c0a0eddf5b8be45c489be133.tar.bz2 rails-1c2b2233c3a7ec76c0a0eddf5b8be45c489be133.zip |
Merge branch 'master' of https://github.com/rails/rails into performance_test
Diffstat (limited to 'railties/lib/rails/application.rb')
-rw-r--r-- | railties/lib/rails/application.rb | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 1b834275a7..0c3c7737ea 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -50,6 +50,7 @@ module Rails end end + attr_accessor :assets delegate :default_url_options, :default_url_options=, :to => :routes # This method is called just after an application inherits from Rails::Application, @@ -116,13 +117,10 @@ module Rails self end - alias :build_middleware_stack :app - def env_config @env_config ||= super.merge({ "action_dispatch.parameter_filter" => config.filter_parameters, "action_dispatch.secret_token" => config.secret_token, - "action_dispatch.asset_path" => nil, "action_dispatch.show_exceptions" => config.action_dispatch.show_exceptions }) end @@ -139,9 +137,7 @@ module Rails protected - def default_asset_path - nil - end + alias :build_middleware_stack :app def default_middleware_stack ActionDispatch::MiddlewareStack.new.tap do |middleware| @@ -156,8 +152,7 @@ module Rails end if config.serve_static_assets - asset_paths = ActiveSupport::OrderedHash[config.static_asset_paths.to_a.reverse] - middleware.use ::ActionDispatch::Static, asset_paths + middleware.use ::ActionDispatch::Static, paths["public"].first end middleware.use ::Rack::Lock unless config.allow_concurrency @@ -205,4 +200,4 @@ module Rails require "rails/console/helpers" end end -end +end
\ No newline at end of file |