Class: Rails::Generators::GeneratedAttribute

Inherits:
Object
  • Object
show all
Defined in:
lib/rails/generators/active_graph_generator.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#type_classObject



108
109
110
111
112
113
114
115
116
117
118
# File 'lib/rails/generators/active_graph_generator.rb', line 108

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