aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/digestor.rb3
-rw-r--r--actionview/lib/action_view/layouts.rb5
2 files changed, 5 insertions, 3 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
diff --git a/actionview/lib/action_view/layouts.rb b/actionview/lib/action_view/layouts.rb
index a74a5e05f3..8db1674187 100644
--- a/actionview/lib/action_view/layouts.rb
+++ b/actionview/lib/action_view/layouts.rb
@@ -248,11 +248,14 @@ module ActionView
#
# If the specified layout is a:
# String:: the String is the template name
- # Symbol:: call the method specified by the symbol, which will return the template name
+ # Symbol:: call the method specified by the symbol
+ # Proc:: call the passed Proc
# false:: There is no layout
# true:: raise an ArgumentError
# nil:: Force default layout behavior with inheritance
#
+ # Return value of Proc & Symbol arguments should be String, false, true or nil
+ # with the same meaning as described above.
# ==== Parameters
# * <tt>layout</tt> - The layout to use.
#