From a01f4d53b35cc7c2bda045a5a782fffa22390e07 Mon Sep 17 00:00:00 2001 From: schneems Date: Thu, 6 Sep 2018 11:12:55 -0500 Subject: [ci skip] Clarify CaptureHelper#capture function --- actionview/lib/action_view/helpers/capture_helper.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'actionview') 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 # # # + # 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) } -- cgit v1.2.3