Class: ActiveInteraction::SymbolFilter

Inherits:
Filter
  • Object
show all
Defined in:
lib/active_interaction/filters/symbol_filter.rb

Instance Attribute Summary

Attributes inherited from Filter

#filters, #name, #options

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) ⇒ Object



19
20
21
22
23
24
25
26
27
28
# File 'lib/active_interaction/filters/symbol_filter.rb', line 19

def cast(value)
  case value
  when Symbol
    value
  when String
    value.to_sym
  else
    super
  end
end