Class: HoboFields::HtmlString
- Inherits:
-
RawHtmlString
- Object
- String
- Text
- RawHtmlString
- HoboFields::HtmlString
- Includes:
- SanitizeHtml
- Defined in:
- lib/hobo_fields/html_string.rb
Constant Summary
Constants included from SanitizeHtml
SanitizeHtml::PERMITTED_ATTRIBUTES, SanitizeHtml::PERMITTED_TAGS
Constants inherited from Text
Text::COLUMN_TYPE, Text::HTML_ESCAPE
Class Method Summary collapse
Methods included from SanitizeHtml
Methods inherited from RawHtmlString
Methods inherited from Text
Class Method Details
.declared(model, name, options) ⇒ Object
7 8 9 |
# File 'lib/hobo_fields/html_string.rb', line 7 def self.declared(model, name, ) model.before_save { |record| record[name] = HoboFields::SanitizeHtml.sanitize(record[name]) } end |