instance method
raw
Ruby on Rails 3.0.20
Since v2.3.18 Last seen in v3.0.20Available in: v2.3.18 v3.0.20
Signature
raw(stringish)
This method outputs without escaping a string. Since escaping tags is now default, this can be used when you don’t want Rails to automatically escape tags. This is not recommended if the data is coming from the user’s input.
For example:
<%=raw @user.name %>
Parameters
-
stringishreq
Source
# File actionpack/lib/action_view/helpers/raw_output_helper.rb, line 13
def raw(stringish)
stringish.to_s.html_safe
end
Defined in actionpack/lib/action_view/helpers/raw_output_helper.rb line 13
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::Helpers::RawOutputHelper