Class: ActiveRecord::Base::VeneerInterface::Property

Inherits:
Veneer::Base::Property show all
Defined in:
lib/veneer/adapters/activerecord/property.rb

Instance Attribute Summary

Attributes inherited from Veneer::Base::Property

#parent

Instance Method Summary collapse

Methods inherited from Veneer::Base::Property

#initialize, #validators

Constructor Details

This class inherits a constructor from Veneer::Base::Property

Instance Method Details

#normalize(type) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/veneer/adapters/activerecord/property.rb', line 5

def normalize(type)
  case type
  when :serial, :integer then Integer
  when :string, :text then String
  when :float then Float
  when :decimal then BigDecimal
  when :datetime then DateTime
  when :time then Time
  when :date then Date
  when :binary then StringIO
  when :boolean then TrueClass
  else type
  end
end