method

html_safe

v3.2.1 - Show latest stable - Class: String
html_safe()
public

No documentation available.

# File activesupport/lib/active_support/core_ext/string/output_safety.rb, line 180
  def html_safe
    ActiveSupport::SafeBuffer.new(self)
  end

1Note

use raw() instead

ssoroka ยท Oct 20, 20107 thanks

Don't use this method unless you're sure your string isn't nil. Instead use the raw() method, which wont raise an exception on nil.