diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2016-07-15 16:29:17 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-15 16:29:17 -0300 |
commit | d41d7a42147c6aca7e4544f20f831272e15ba6ca (patch) | |
tree | 5f2fab8ebae8cf944b911543720e850d5d1cb673 /actionview | |
parent | 4f567d8d45b025ddef73263321f7f404128ca231 (diff) | |
parent | dbd3b0bfb3150d919dabfef78f749d8411e04541 (diff) | |
download | rails-d41d7a42147c6aca7e4544f20f831272e15ba6ca.tar.gz rails-d41d7a42147c6aca7e4544f20f831272e15ba6ca.tar.bz2 rails-d41d7a42147c6aca7e4544f20f831272e15ba6ca.zip |
Merge pull request #25826 from javan/actionview/trim-digestor-template-lookups
Eliminate extra template lookup in ActionView::Digestor
Diffstat (limited to 'actionview')
-rw-r--r-- | actionview/lib/action_view/digestor.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/actionview/lib/action_view/digestor.rb b/actionview/lib/action_view/digestor.rb index 9c18ec56ca..cadef22022 100644 --- a/actionview/lib/action_view/digestor.rb +++ b/actionview/lib/action_view/digestor.rb @@ -41,8 +41,7 @@ module ActionView options = {} options[:formats] = [finder.rendered_format] if finder.rendered_format - if finder.disable_cache { finder.exists?(logical_name, [], partial, [], options) } - template = finder.disable_cache { finder.find(logical_name, [], partial, [], options) } + if template = finder.disable_cache { finder.find_all(logical_name, [], partial, [], options).first } finder.rendered_format ||= template.formats.first if node = seen[template.identifier] # handle cycles in the tree |