With Mysql I can use COALESCE
to update only the values that are emtpy in a table.
How can I do this with Rails (ActiveRecord)?
I don't want to create if
statements for each column in the table and am guessing there has to be a way to do it if I pass an ActiveRecord hash to the update_attributes
method.
Thanks.