Module: ActiveModel::Validations::HelperMethods
- Defined in:
- lib/strip-tags.rb
Instance Method Summary collapse
-
#strip_tags(options = {}) ⇒ Object
Strips tags from model fields.
Instance Method Details
#strip_tags(options = {}) ⇒ Object
Strips tags from model fields.
6 7 8 9 10 11 12 |
# File 'lib/strip-tags.rb', line 6 def ( = {}) StripTags.() before_validation(.slice(:if, :unless)) do |record| StripTags.strip(record, ) end end |