Class: Types::PresentString

Inherits:
ActiveRecord::Type::String
  • Object
show all
Defined in:
app/lib/types/present_string.rb

Instance Method Summary collapse

Instance Method Details

#cast(value) ⇒ Object



6
7
8
# File 'app/lib/types/present_string.rb', line 6

def cast(value)
  super(value).presence
end

#typeObject



2
3
4
# File 'app/lib/types/present_string.rb', line 2

def type
  :present_string
end