Skip to content

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.

1 participant