Class: Rails::Generators::GeneratedAttribute

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

Instance Method Summary collapse

Instance Method Details

#type_classObject



58
59
60
61
62
# File 'lib/rails/generators/mongoid_generator.rb', line 58

def type_class
  return "Time" if type.to_s == "datetime"
  return "String" if type.to_s == "text"
  type.to_s.camelcase
end