For a namespaced model like Blog::Post, show_for outputs the model name as blogpost (so an attribute is output with a class blogpost_body). On Rails forms, it is output as blog_post (blog_post_body). To have that same behavior, this pull request changes show_for to get the object name from the model model_name.param_key.
Tests pass with this change, but I'm not sure if we should add a test about namespacing. Please let me know what you think :)
Thank you for the pull request.
Yes, we will need a test about namespacing. Could you add? Do you need any help?
Uses model model_name.param_key as the object name
@rafaelfranca Added test, please let me know if it needs additional improvements!
@fabiokr merged. Thank you so much.