danott / react-rails-form-helpers

Components for composing forms targeted at Rails
MIT License
81 stars 18 forks source link

feat(FieldsFor) allow use outside of `FormFor` #6

Closed danielma closed 7 years ago

danielma commented 7 years ago

I have a use case where I want to build my form tag and part of my form using native rails helpers, and then part of my form using React. To accomplish this, I've made it so FieldsFor can work properly even if this.context.railsFormNamespaces is null.

Previously, it would throw an error because you can't splat null into an array