Method: ActiveForm::Mixins::Casting#cast_value
- Defined in:
- lib/active_form/mixins/casting.rb
#cast_value(value) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/active_form/mixins/casting.rb', line 10 def cast_value(value) if self.respond_to?(:casting_filter) self.casting_filter(value) elsif self.class.respond_to?(:casting_filter) self.class.casting_filter(value) else value end end |