1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

use the accessors on the request object rather than touching env

This commit is contained in:
Aaron Patterson 2014-05-23 10:17:57 -07:00
parent 559d89c5b3
commit ca02296706

View file

@ -66,8 +66,8 @@ module ActionDispatch
find_routes(rails_req).each do |match, parameters, route|
unless route.path.anchored
req.env['SCRIPT_NAME'] = match.to_s
req.env['PATH_INFO'] = match.post_match.sub(/^([^\/])/, '/\1')
rails_req.script_name = match.to_s
rails_req.path_info = match.post_match.sub(/^([^\/])/, '/\1')
end
yield(route, parameters)