Customize Rails Scaffold Generator Templates for Admin

I have a rails app with an Admin interface. My admin views and controllers are under a /admin directory. I'd like to customize the scaffold generator erb templates so that it generates the end user views and a set of admin views (as they are different in styling, etc...).

I know you can copy index.html.erb for instance to your-project/lib/templates/erb/scaffold and running rails g scaffold admin::blog generates the admin files needed. Is there a way to have two separate index.html.erb scaffold templates, one for the front end and one for the admin?

0 Comment



Captcha image