diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-01-30 21:51:09 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-30 21:51:09 -0500 |
commit | ce97c79445f9ac4b056e34deaaaaf25cadc08b72 (patch) | |
tree | 03ef116200ec06a867fd6ca9b144483d769e2a0d /actionpack/lib/action_dispatch/journey/path | |
parent | 543f19626b80e72c543306b6ca67421df3a42d6c (diff) | |
parent | 5b1332bb4d3c3aa5215b43004d1e7f6a8d376dd0 (diff) | |
download | rails-ce97c79445f9ac4b056e34deaaaaf25cadc08b72.tar.gz rails-ce97c79445f9ac4b056e34deaaaaf25cadc08b72.tar.bz2 rails-ce97c79445f9ac4b056e34deaaaaf25cadc08b72.zip |
Merge pull request #27647 from Shopify/fully-eagerload-journey
Fully initialize routes before the first request is handled
Diffstat (limited to 'actionpack/lib/action_dispatch/journey/path')
-rw-r--r-- | actionpack/lib/action_dispatch/journey/path/pattern.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/journey/path/pattern.rb b/actionpack/lib/action_dispatch/journey/path/pattern.rb index 0902b9233e..cf0108ec32 100644 --- a/actionpack/lib/action_dispatch/journey/path/pattern.rb +++ b/actionpack/lib/action_dispatch/journey/path/pattern.rb @@ -31,6 +31,13 @@ module ActionDispatch Visitors::FormatBuilder.new.accept(spec) end + def eager_load! + required_names + offsets + to_regexp + nil + end + def ast @spec.find_all(&:symbol?).each do |node| re = @requirements[node.to_sym] |