Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: action_controller/caching.rb
- ===================================================================
- --- action_controller/caching.rb (revision 5487)
- +++ action_controller/caching.rb (working copy)
- @@ -330,7 +330,7 @@
- def cache_erb_fragment(block, name = {}, options = nil)
- unless perform_caching then block.call; return end
- - buffer = eval("_erbout", block.binding)
- + buffer = eval(ActionView::Base.erb_variable, block.binding)
- if cache = read_fragment(name, options)
- buffer.concat(cache)
- Index: action_view/helpers/text_helper.rb
- ===================================================================
- --- action_view/helpers/text_helper.rb (revision 5487)
- +++ action_view/helpers/text_helper.rb (working copy)
- @@ -23,7 +23,7 @@
- # is equivalent to using:
- # <%= "hello" %>
- def concat(string, binding)
- - eval("_erbout", binding).concat(string)
- + eval(ActionView::Base.erb_variable, binding).concat(string)
- end
- # If +text+ is longer than +length+, +text+ will be truncated to the length of
- Index: action_view/helpers/capture_helper.rb
- ===================================================================
- --- action_view/helpers/capture_helper.rb (revision 5487)
- +++ action_view/helpers/capture_helper.rb (working copy)
- @@ -56,15 +56,15 @@
- def capture(*args, &block)
- # execute the block
- begin
- - buffer = eval("_erbout", block.binding)
- + buffer = eval(ActionView::Base.erb_variable, block.binding)
- rescue
- buffer = nil
- end
- if buffer.nil?
- - capture_block(*args, &block)
- + capture_block(*args, &block).to_s
- else
- - capture_erb_with_buffer(buffer, *args, &block)
- + capture_erb_with_buffer(buffer, *args, &block).to_s
- end
- end
- @@ -99,7 +99,7 @@
- end
- def capture_erb(*args, &block)
- - buffer = eval("_erbout", block.binding)
- + buffer = eval(ActionView::Base.erb_variable, block.binding)
- capture_erb_with_buffer(buffer, *args, &block)
- end
- Index: action_view/base.rb
- ===================================================================
- --- action_view/base.rb (revision 5487)
- +++ action_view/base.rb (working copy)
- @@ -183,6 +183,9 @@
- # that alert()s the caught exception (and then re-raises it).
- @@debug_rjs = false
- cattr_accessor :debug_rjs
- +
- + @@erb_variable = '_erbout'
- + cattr_accessor :erb_variable
- @@template_handlers = HashWithIndifferentAccess.new
Add Comment
Please, Sign In to add comment