Class: PgEnum::ActiveRecord::ConnectionAdapters::Column

Inherits:
Object
  • Object
show all
Defined in:
lib/pg_enum/active_record.rb

Direct Known Subclasses

PostgreSQLColumn

Instance Method Summary collapse

Instance Method Details

#klassObject



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/pg_enum/active_record.rb', line 28

def klass
  case type
    when :integer       then Fixnum
    when :float         then Float
    when :decimal       then BigDecimal
    when :datetime      then Time
    when :date          then Date
    when :timestamp     then Time
    when :time          then Time
    when :text, :string then String
    when :binary        then String
    when :boolean       then Object
    else String
  end
end