As you may already know when you a generate a new resource, model or controller there are bunch of other files that are also being generated for you. Rails has a great way to customize the default generators as you wish. For example let’s assume that we are creating an API for a mobile app. Let call this app sample_api Let’s create a controller for our sample_api
rails g controller posts
Now let’s see the generator in action again.
Voila :) As you can see assets are no longer being generated for us. Customizing the generators can really improve our workflow. You can disable unwanted test or spec generation, disable assets or whatever you want. Hell, you can even create your own generators. Happy Hacking <3