Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generator for copying views #4

Closed
excid3 opened this issue Dec 29, 2020 · 2 comments
Closed

Generator for copying views #4

excid3 opened this issue Dec 29, 2020 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@excid3
Copy link
Owner

excid3 commented Dec 29, 2020

We really like how Administrate does this and it's a nice way to go:

rails g madmin:views should copy over app/views from madmin so you can override the templates and add features.

Specific views

rails generate madmin:views:show
 # -> app/views/admin/application/show.html.erb

Specific views for a resource

rails generate madmin:views:show User
 # -> app/views/admin/users/show.html.erb

rails generate madmin:views:edit User
 # -> app/views/admin/users/edit.html.erb
 # -> app/views/admin/users/_form.html.erb

rails generate madmin:views:new User
 # -> app/views/admin/users/new.html.erb
 # -> app/views/admin/users/_form.html.erb
@excid3 excid3 added enhancement New feature or request good first issue Good for newcomers labels Jan 15, 2021
@esmale
Copy link
Contributor

esmale commented Feb 9, 2021

I think this issue can be closed now, due to the recent PRs that have already been merged in. (Sorry for not linking the PRs to this specific issue, never needed to do that before.)

@excid3
Copy link
Owner Author

excid3 commented Feb 9, 2021

Linking PRs is just hashtag and the number: #21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants