Class: Price

Inherits:
Object
  • Object
show all
Includes:
Mongoid::Document
Defined in:
app/models/price.rb

Instance Method Summary collapse

Instance Method Details

#to_s(missing_string) ⇒ Object



9
10
11
12
# File 'app/models/price.rb', line 9

def to_s(missing_string)
  return "#{currency} #{(amount - amount.floor) >0 ? amount : amount.floor}" if currency && amount
  return missing_string
end