view_component-form
view_component-form copied to clipboard
Dynamic object name in test helper
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.
Great! Can you please add a changelog entry?
Also, can we add a test that uses this new behavior?
@woller can you rebase? We fixed CI in main.