Class: Merb::Generators::ModelGenerator
- Inherits:
-
Object
- Object
- Merb::Generators::ModelGenerator
- Defined in:
- lib/generators/data_mapper_model.rb
Instance Method Summary collapse
- #after_generation ⇒ Object
-
#datamapper_type(type) ⇒ Object
Corrects case of common datamapper arguments.
Instance Method Details
#after_generation ⇒ Object
9 10 11 12 13 |
# File 'lib/generators/data_mapper_model.rb', line 9 def after_generation if orm == :datamapper STDOUT << ("Don't forget to define the model schema in your #{ Extlib::Inflection.camelize(file_name) } class") end end |
#datamapper_type(type) ⇒ Object
Corrects case of common datamapper arguments.
4 5 6 7 |
# File 'lib/generators/data_mapper_model.rb', line 4 def datamapper_type(type) return 'DateTime' if type == 'datetime' return type.camel_case end |