Save All Empty Strings as NIL
Save All Empty Strings as NIL WHERE field IS NULL OR field = ‘’ no more… Rails plugin that converts all empty strings to nil when saving. Avoids lots of query/performance/syntax problems. Includes migration to clean your existing records.
Comments
preview works great :D
It’s just a JavaScript copy from textbox to showing the HTML. No sanitization. The title box does say not to put HTML in it ;-)
Oracle treats empty strings as NULL already (i.e. they become NULL on insert or update). I’m pretty sure Postgres does, too.
Maybe you should reconsider your RDBMS.
Post a comment