aboutsummaryrefslogtreecommitdiffstats
path: root/load_paths.rb
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2012-05-02 23:42:43 +0100
committerAndrew White <andyw@pixeltrix.co.uk>2012-05-03 00:00:19 +0100
commit7c7fb3a862651d87c4071e40a1799b973f626b11 (patch)
tree22a7fbb277f5be046dda426e69497ed4d17e627b /load_paths.rb
parentebe994f83c717f8ef25dc54490e13bc0dd048188 (diff)
downloadrails-7c7fb3a862651d87c4071e40a1799b973f626b11.tar.gz
rails-7c7fb3a862651d87c4071e40a1799b973f626b11.tar.bz2
rails-7c7fb3a862651d87c4071e40a1799b973f626b11.zip
Reset the request parameters after a constraints check
A callable object passed as a constraint for a route may access the request parameters as part of its check. This causes the combined parameters hash to be cached in the environment hash. If the constraint fails then any subsequent access of the request parameters will be against that stale hash. To fix this we delete the cache after every call to `matches?`. This may have a negative performance impact if the contraint wraps a large number of routes as the parameters hash is built by merging GET, POST and path parameters. Fixes #2510. (cherry picked from commit 56030506563352944fed12a6bb4793bb2462094b)
Diffstat (limited to 'load_paths.rb')
0 files changed, 0 insertions, 0 deletions