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

Dynamic object name in test helper #165

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

woller
Copy link

@woller woller commented Jul 18, 2024

Instead of hard coding :useras the object name in the supplied test_helper, this PR checks if the class of the object passed to form_with responds to model_name and uses the param key from there. If it does not respond, it defaults to user.

@nicolas-brousse nicolas-brousse requested review from Spone and nicolas-brousse and removed request for Spone July 18, 2024 13:16
@Spone
Copy link
Collaborator

Spone commented Jul 19, 2024

Great! Can you please add a changelog entry?

Also, can we add a test that uses this new behavior?

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.

2 participants