On 28 Dec 2009, at 18:04, Josh Susser wrote: > That's reasonably concise, but just keep in mind that all of this is > just to make Ruby act more like Perl where empty strings are false-ish > values. I'm sure there are other use cases for #presence, but empty > strings that come from form submissions seem like at least 90% of the > issue.
Maybe we could eliminate that use case by nullifying blank strings where appropriate: http://github.com/pixeltrix/nullify_blanks The empty strings in my databases always bugged me so I wrote the above plugin to fix that. It only nullifies a blank string where a column exists, is a text column and accepts nulls. Andrew -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
