Is there a way to automatically convert empty string to nils during mass
assignment?
Currently:
irb(main):016:0> c = {first_name:'micky',last_name:'mouse',title:''}=> {:
first_name=>"micky", :last_name=>"mouse", :title=>""}
irb(main):017:0> Contact.new(c)=> #<Contact @values={:first_name=>"micky",
:last_name=>"mouse", :title=>""}>
While it's not a big deal to store the empty strings, I'd prefer not to do
so.
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.