Class: Types::PresentString

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

Overview

Library code: present string.

Instance Method Summary collapse

Instance Method Details

#cast(value) ⇒ Object



8
9
10
# File 'app/lib/types/present_string.rb', line 8

def cast(value)
  super.presence
end

#typeObject



4
5
6
# File 'app/lib/types/present_string.rb', line 4

def type
  :present_string
end