Open tiagocassio opened 6 years ago
Done! Thanks!
I checked your code on my local PC.
I noticed that when I use fields_for
, the attribute names do not get camelized.
Unfortunately, I can not find any solution for this problem.
Now I think it is rather inconvenient for developers to specify camelize
option for each form_for
and form_with
. It should be configured globally.
But I don't any idea how to allow this configuration on this gem.
I confess that i was not expecting this. I will try at night, i'm out now.
This type of option should also be in the initializer, like jBuilder. This would also maintain backward compatibility for people need to upgrade, in the same manner, that Rails does; If the default was to change.
If your interested, I took this PR and upgraded my fork. https://github.com/sirwolfgang/vue-rails-form-builder
Edited: I forgot how you have to change a ton of tiny settings to get everything in default rails to be camel case.
The issue you are seeing with setting the options here is that camelize is being set on the form and not the tags. You have to store the form options on the builder, then use it for each tag like this: https://github.com/sirwolfgang/vue-rails-form-builder/commit/574fd66e8f7a589d47109687fdb981656b9323a4
@tiagocassio
Thanks. Could you add some description to the
README.md
?