lib/economic/invoice.rb in rconomic-0.4 vs lib/economic/invoice.rb in rconomic-0.4.1

- old
+ new

@@ -3,11 +3,11 @@ module Economic class Invoice < Entity has_properties :number, :net_amount, :vat_amount, :due_date, :debtor_handle, :debtor_name, :debtor_name, :debtor_address, :debtor_postal_code, :debtor_city, :debtor_country, :debtor_ean, :attention_handle, :heading def attention - return nil if attention_handle.blank? + return nil if attention_handle.nil? @attention ||= session.contacts.find(attention_handle) end def attention=(contact) self.attention_handle = contact.handle @@ -18,10 +18,10 @@ @attention = nil unless handle == @attention_handle @attention_handle = handle end def debtor - return nil if debtor_handle.blank? + return nil if debtor_handle.nil? @debtor ||= session.debtors.find(debtor_handle) end def debtor=(debtor) self.debtor_handle = debtor.handle