Class: Rails::Generators::GeneratedAttribute

Inherits:
Object
  • Object
show all
Defined in:
build/mongoid-7.3/lib/rails/generators/mongoid_generator.rb

Instance Method Summary collapse

Instance Method Details

#type_classObject



22
23
24
25
26
27
# File 'build/mongoid-7.3/lib/rails/generators/mongoid_generator.rb', line 22

def type_class
  return "Time" if type == :datetime
  return "String" if type == :text
  return "Mongoid::Boolean" if type == :boolean
  type.to_s.camelcase
end