Class: Rails::Generators::GeneratedAttribute

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

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#type_classObject



54
55
56
57
58
59
60
61
62
63
# File 'lib/generators/mongoid.rb', line 54

def type_class
  case type
  when :datetime
    "Time"
  when :text
    "String"
  else
    type.to_s.camelcase
  end
end