Class: Rails::Generators::GeneratedAttribute

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

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#type_classObject



63
64
65
66
67
# File 'lib/rails/generators/mongoid_generator.rb', line 63

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