aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorojab <ojab@ojab.ru>2016-07-15 20:10:29 +0000
committerojab <ojab@ojab.ru>2016-07-15 21:54:31 +0000
commit80ac40c6d4a674b6c5fa16bfa5cb5f95e89c3094 (patch)
tree28fd183ddcf9fd5289350a99b647ea72c07b934f /actionview
parentd41d7a42147c6aca7e4544f20f831272e15ba6ca (diff)
downloadrails-80ac40c6d4a674b6c5fa16bfa5cb5f95e89c3094.tar.gz
rails-80ac40c6d4a674b6c5fa16bfa5cb5f95e89c3094.tar.bz2
rails-80ac40c6d4a674b6c5fa16bfa5cb5f95e89c3094.zip
Mention that layout can call a Proc [ci skip]
Also document return values for Proc/Symbol arguments
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/layouts.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/actionview/lib/action_view/layouts.rb b/actionview/lib/action_view/layouts.rb
index a74a5e05f3..bcb357a06f 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 meaning as described above.
# ==== Parameters
# * <tt>layout</tt> - The layout to use.
#