pantographe / view_component-form

Rails FormBuilder for ViewComponent
MIT License
204 stars 16 forks source link

Dynamic object name in test helper #165

Open woller opened 1 month ago

woller commented 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.

Spone commented 1 month ago

Great! Can you please add a changelog entry?

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