Overriding Rails Scaffold for Custom API Versioning Functionality

Viewed 265

I'm trying to customize the rails scaffold command so that when I run

rails generate scaffold api/v1/model_name

it still produces the folder structure but doesn't add api_v1_ to the views, tests, etc.

i.e. enter image description here

I understand how to override and add new partials from this post: Override Rails scaffold generator but I would like to override the test, factory, and view.

0 Answers
Related