I've created a form builder in rails that allows users to construct their own forms. Many of the form inputs supply straight strings back to Rails (e.g. a text field). Some provide arrays of values (like date choosers). Right now I'm storing the values for these in a serialised column. It works well, and lets me re-display the custom forms when an error occurs with minimal effort. The problem is that someone entered:
--------
into a text field and ActiveRecord raised an error saying: You tried to assign already serialized content to value. This is disabled due to security issues.
I get that the string looks like YAML, but I'm wondering if there's a more graceful way around this as the user was just entering a bunch of dashes to indicate he had no phone number. I'd like it to basically fail gracefully and perhaps drop the value or store it as a serialised string if there is such a thing.