bh
bh copied to clipboard
In a nested form, options[:errors] can be nil
The problem here is:
{ errors: nil }.fetch(:errors, {}) #==> nil
but the code expects:
({ errors: nil }.fetch(:errors) || {}) #==> {}
for the chained #fetch to work.
These patches fix the two problematic lines, though a more sophisticated patch should fix why in fields_for can the key exists with a nil value in first place.