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

use rails helpers for resource routes #186

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

phoffer
Copy link

@phoffer phoffer commented Jan 9, 2023

I encountered some issues when using Rails scaffolding with a model name/namespace that didn't match up. Ie. scaffolding admin routes for some resources like this:

rails generate scaffold admin/user name:string --model-name="User"

This should generate everything using a User model, but with routing that follows admin_user* naming pattern. However, the templates would generate links with user* for paths.

This updates the templates to use the rest of the routing helpers Rails provides, and also includes a handler for the form target url, only if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant