Skip to content

Commit

Permalink
Deleted all references to ActionView::SafeBuffer in favor of ActiveSu…
Browse files Browse the repository at this point in the history
…pport::SafeBuffer

Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local>
  • Loading branch information
spastorino authored and Yehuda Katz committed Feb 1, 2010
1 parent 9987a00 commit 1adfb92
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions actionpack/lib/action_view.rb
Expand Up @@ -58,6 +58,4 @@ module ActionView
require 'active_support/core_ext/string/output_safety'
require 'action_view/base'

ActionView::SafeBuffer = ActiveSupport::SafeBuffer

I18n.load_path << "#{File.dirname(__FILE__)}/action_view/locale/en.yml"
2 changes: 1 addition & 1 deletion actionpack/lib/action_view/helpers/capture_helper.rb
Expand Up @@ -143,7 +143,7 @@ def content_for?(name)
# Defaults to a new empty string.
def with_output_buffer(buf = nil) #:nodoc:
unless buf
buf = ActionView::SafeBuffer.new
buf = ActiveSupport::SafeBuffer.new
buf.force_encoding(output_buffer.encoding) if buf.respond_to?(:force_encoding)
end
self.output_buffer, old_buffer = buf, output_buffer
Expand Down
2 changes: 1 addition & 1 deletion actionpack/lib/action_view/template/handlers/erb.rb
Expand Up @@ -6,7 +6,7 @@ module ActionView
module Template::Handlers
class Erubis < ::Erubis::Eruby
def add_preamble(src)
src << "@output_buffer = ActionView::SafeBuffer.new;"
src << "@output_buffer = ActiveSupport::SafeBuffer.new;"
end

def add_text(src, text)
Expand Down
@@ -1,8 +1,8 @@
require 'abstract_unit'

class SafeBufferTest < ActionView::TestCase
class SafeBufferTest < ActiveSupport::TestCase
def setup
@buffer = ActionView::SafeBuffer.new
@buffer = ActiveSupport::SafeBuffer.new
end

test "Should look like a string" do
Expand Down Expand Up @@ -36,6 +36,6 @@ def setup

test "Should return a safe buffer when calling to_s" do
new_buffer = @buffer.to_s
assert_equal ActionView::SafeBuffer, new_buffer.class
assert_equal ActiveSupport::SafeBuffer, new_buffer.class
end
end

0 comments on commit 1adfb92

Please sign in to comment.