Class: Rails::Generators::GeneratedAttribute
- Defined in:
- lib/generators/opium/model_generator.rb
Instance Method Summary collapse
Instance Method Details
#type_class ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/generators/opium/model_generator.rb', line 6 def type_class case type.to_s when 'datetime' 'DateTime' when 'file' 'Opium::File' when 'geopoint', 'geo_point' 'Opium::GeoPoint' when 'boolean', 'bool' 'Opium::Boolean' else type.to_s.camelcase end end |