How about attributes.delete(key) if @record[key].empty? && value == [""]

That reduces the work that AF::Base.attributes= has to do.