...

/

Leverage Generators and Templates over Documentation

Leverage Generators and Templates over Documentation

Learn about leverage generators and templates in Rails applications.

Conventions for consistent Rails development

The first step to establishing a convention is to write it down. For example, putting business logic in app/services might be something a team would document in a README. A team might also write down examples of how to write a job or a controller.

In addition to basic automation, like we did with bin/setup and bin/run, or automatically generated documentation, like we did with our style guide, automatically generating code for common use cases can be far more compelling than documentation, especially when the boilerplate is somewhat complicated. For example, we might create internal RubyGems to share code. These gems likely should have a common structure and common features. If the only way a developer would know those is some piece of ...