instance method
raw
Ruby on Rails 3.1.12
Since v3.1.12Signature
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/output_safety_helper.rb, line 15
def raw(stringish)
stringish.to_s.html_safe
end
Defined in actionpack/lib/action_view/helpers/output_safety_helper.rb line 15
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::Helpers::OutputSafetyHelper