lib/rents/currency.rb in rents-1.0.6 vs lib/rents/currency.rb in rents-1.0.7

- old
+ new

@@ -4,9 +4,10 @@ # Receive it amount in Decimal and convert to operator str, like 10,00 or 10.00 to 1000 def self.to_operator_str(amount) # Check invalid entry return nil if amount.nil? return amount.to_s if amount.is_a?Integer + return amount if amount.is_a?(String) && amount.index('.').nil? && amount.index(',').nil? amount = format('%.2f', amount) if amount.to_s.float? if amount.is_a?String return amount if amount.index('.').nil? && amount.index(',').nil? \ No newline at end of file