ryanb / nested_form

Rails plugin to conveniently handle multiple models in a single form.
MIT License
1.79k stars 505 forks source link

Blueprint adds default value when using textarea input #319

Open davoclavo opened 10 years ago

davoclavo commented 10 years ago

When using textarea the blueprint sets a default value of " " (8 spaces) to it. This happens because the fields_for renders the form with "\n" characters, when they are added as attributes to the html entity (as data-blueprint), it gets changed to spaces (at least in Chrome)

I made this proof of concept on how to fix it, but I don't know if there is a more elegant way of doing it: https://github.com/davoclavo/nested_form/commit/ad828ed3712c6c1dd28e7c8f6566786d90b80410

prinum commented 10 years ago

:+1: