Open woller opened 1 month ago
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.
:user
form_with
model_name
Great! Can you please add a changelog entry?
Also, can we add a test that uses this new behavior?
Instead of hard coding
:user
as the object name in the supplied test_helper, this PR checks if the class of the object passed toform_with
responds tomodel_name
and uses the param key from there. If it does not respond, it defaults to user.