Sha256: ada92857151e2828aa7c381bb707d87a5dbda1e675a0e1a6193d8a98e691e9eb
Contents?: true
Size: 786 Bytes
Versions: 2
Compression:
Stored size: 786 Bytes
Contents
require 'active_support/core_ext/string/output_safety' module ActionView class OutputBuffer < ActiveSupport::SafeBuffer #:nodoc: def initialize(*) super encode! if encoding_aware? end def <<(value) super(value.to_s) end alias :append= :<< alias :safe_append= :safe_concat end class StreamingBuffer #:nodoc: def initialize(block) @block = block end def <<(value) value = value.to_s value = ERB::Util.h(value) unless value.html_safe? @block.call(value) end alias :concat :<< alias :append= :<< def safe_concat(value) @block.call(value.to_s) end alias :safe_append= :safe_concat def html_safe? true end def html_safe self end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
actionpack-3.1.0.rc1 | lib/action_view/buffers.rb |
actionpack-3.1.0.beta1 | lib/action_view/buffers.rb |