diff options
author | schneems <richard.schneeman+foo@gmail.com> | 2018-09-06 11:12:55 -0500 |
---|---|---|
committer | schneems <richard.schneeman+foo@gmail.com> | 2018-09-06 11:12:55 -0500 |
commit | a01f4d53b35cc7c2bda045a5a782fffa22390e07 (patch) | |
tree | 051c607e244f71caa2151a9a48f8ad1d329c6c21 /actionview | |
parent | 12fadea8aee3981654149d6e8ff5099bca31c679 (diff) | |
download | rails-a01f4d53b35cc7c2bda045a5a782fffa22390e07.tar.gz rails-a01f4d53b35cc7c2bda045a5a782fffa22390e07.tar.bz2 rails-a01f4d53b35cc7c2bda045a5a782fffa22390e07.zip |
[ci skip] Clarify CaptureHelper#capture function
Diffstat (limited to 'actionview')
-rw-r--r-- | actionview/lib/action_view/helpers/capture_helper.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionview/lib/action_view/helpers/capture_helper.rb b/actionview/lib/action_view/helpers/capture_helper.rb index 92f7ddb70d..63707280a3 100644 --- a/actionview/lib/action_view/helpers/capture_helper.rb +++ b/actionview/lib/action_view/helpers/capture_helper.rb @@ -36,6 +36,11 @@ module ActionView # </body> # </html> # + # The output of `capture` is the rendered string. For Example: + # + # puts @greeting + # # => "Welcome to my shiny new web page! The date and time is 2018-09-06 11:09:16 -0500" + # def capture(*args) value = nil buffer = with_output_buffer { value = yield(*args) } |