diff options
Diffstat (limited to 'actionpack/lib/action_view/path_set.rb')
-rw-r--r-- | actionpack/lib/action_view/path_set.rb | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/actionpack/lib/action_view/path_set.rb b/actionpack/lib/action_view/path_set.rb index 2a54b12f78..2f662b0739 100644 --- a/actionpack/lib/action_view/path_set.rb +++ b/actionpack/lib/action_view/path_set.rb @@ -21,26 +21,21 @@ module ActionView #:nodoc: def find_all(path, prefixes = [], *args) prefixes.each do |prefix| templates = [] - each do |resolver| templates.concat resolver.find_all(path, prefix, *args) end - return templates unless templates.empty? end - [] end def find_first(path, prefixes = [], *args) prefixes.each do |prefix| each do |resolver| - if template = resolver.find_all(path, prefix, *args).first - return template - end + template = resolver.find_all(path, prefix, *args).first + return template if template end end - nil end |