From a empty Rails project generated, this rails code generator can generate:
- Models with Associations
- Controllers
- Views with material design
- Gem file
- Migrations files
prerequisites
- Watch "Ruby on Rails Code Generator - [Eclipse - Maven - Acceleo - Cloud9]" video of Camilo Benavides from the follow link: https://www.youtube.com/watch?v=x14ZnQhR3r0&t=89s
- Eclipse Neon needs to be installed
- Ask for miniuml project of Camilo Benavides
Usage
- Replace the generate.mtl(/src/miniuml/generator/main/) file from this project to miniuml.generator/src/miniuml/generator/main/ project
- Generate a rails application with: rails new projectname
- As the 1:51 from the video, you can create primitive types with the following values: belongs_to has_many integer string date boolean float datetime time
- Create classes as seen in the video(2:35).
Considerations- Parent property is not supported.
- belongs_to and has_many primitive types are only for associations
- When you create a property either belongs_to or has_many the value of the name must be exactly what class you want to be associated
- If you want to associate models, in your class, first create all belongs_to Attributes and then all has_many Attributes.
- Execute the project as seen in the video.
Consideration To run the migration files, please change the name of them sorted in order to not have problems.
Note.- The BootstrapFormBuilder class and javascript and css files are from Ecommerce - Codigo Facilito course. This project was developed with the help of the miniuml project from Camilo Benavides