aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/journey/route.rb
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2017-01-30 21:51:09 -0500
committerGitHub <noreply@github.com>2017-01-30 21:51:09 -0500
commitce97c79445f9ac4b056e34deaaaaf25cadc08b72 (patch)
tree03ef116200ec06a867fd6ca9b144483d769e2a0d /actionpack/lib/action_dispatch/journey/route.rb
parent543f19626b80e72c543306b6ca67421df3a42d6c (diff)
parent5b1332bb4d3c3aa5215b43004d1e7f6a8d376dd0 (diff)
downloadrails-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/route.rb')
-rw-r--r--actionpack/lib/action_dispatch/journey/route.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/journey/route.rb b/actionpack/lib/action_dispatch/journey/route.rb
index f2ac4818d8..927fd369c4 100644
--- a/actionpack/lib/action_dispatch/journey/route.rb
+++ b/actionpack/lib/action_dispatch/journey/route.rb
@@ -73,6 +73,14 @@ module ActionDispatch
@internal = internal
end
+ def eager_load!
+ path.eager_load!
+ ast
+ parts
+ required_defaults
+ nil
+ end
+
def ast
@decorated_ast ||= begin
decorated_ast = path.ast