Class: ActiveInteraction::StringFilter
- Defined in:
- lib/active_interaction/filters/string_filter.rb
Overview
Instance Attribute Summary
Attributes inherited from Filter
Instance Method Summary collapse
Methods inherited from Filter
#clean, #database_column_type, #default, #default?, #desc, factory, #initialize
Constructor Details
This class inherits a constructor from ActiveInteraction::Filter
Instance Method Details
#cast(value, _interaction) ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/active_interaction/filters/string_filter.rb', line 24 def cast(value, _interaction) case value when String strip? ? value.strip : value else super end end |