Module: ActiveGraph::Generators::GeneratedAttribute

Defined in:
lib/rails/generators/migration_helper.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#type_classObject



90
91
92
93
94
95
96
97
98
99
100
# File 'lib/rails/generators/migration_helper.rb', line 90

def type_class
  case type.to_s.downcase
  when 'any' then 'any'
  when 'datetime' then 'DateTime'
  when 'date' then 'Date'
  when 'integer', 'number', 'fixnum' then 'Integer'
  when 'float' then 'Float'
  else
    'String'
  end
end