diff options
Diffstat (limited to 'actionpack/lib/action_view/helpers')
4 files changed, 5 insertions, 14 deletions
diff --git a/actionpack/lib/action_view/helpers/capture_helper.rb b/actionpack/lib/action_view/helpers/capture_helper.rb index 25e62f78fb..ab453fadf2 100644 --- a/actionpack/lib/action_view/helpers/capture_helper.rb +++ b/actionpack/lib/action_view/helpers/capture_helper.rb @@ -31,7 +31,7 @@ module ActionView # </body></html> # def capture(*args, &block) - if @output_buffer + if output_buffer with_output_buffer { block.call(*args) } else block.call(*args) @@ -121,10 +121,10 @@ module ActionView private def with_output_buffer(buf = '') - @output_buffer, old_buffer = buf, @output_buffer + self.output_buffer, old_buffer = buf, output_buffer yield ensure - @output_buffer = old_buffer + self.output_buffer = old_buffer end end end diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb index 85b205c264..7404a251e4 100644 --- a/actionpack/lib/action_view/helpers/javascript_helper.rb +++ b/actionpack/lib/action_view/helpers/javascript_helper.rb @@ -202,11 +202,6 @@ module ActionView end js_option end - - private - def block_is_within_action_view?(block) - !@output_buffer.nil? - end end JavascriptHelper = JavaScriptHelper unless const_defined? :JavascriptHelper diff --git a/actionpack/lib/action_view/helpers/tag_helper.rb b/actionpack/lib/action_view/helpers/tag_helper.rb index a8a5987b1f..e1abec1847 100644 --- a/actionpack/lib/action_view/helpers/tag_helper.rb +++ b/actionpack/lib/action_view/helpers/tag_helper.rb @@ -122,10 +122,6 @@ module ActionView " #{attrs.sort * ' '}" unless attrs.empty? end end - - def block_is_within_action_view?(block) - !@output_buffer.nil? - end end end end diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb index f81f7eded6..85a3672678 100644 --- a/actionpack/lib/action_view/helpers/text_helper.rb +++ b/actionpack/lib/action_view/helpers/text_helper.rb @@ -26,8 +26,8 @@ module ActionView # # will either display "Logged in!" or a login link # %> def concat(string) - if @output_buffer && string - @output_buffer << string + if output_buffer && string + output_buffer << string else string end |