Skip to content

Commit 6b10d3c

Browse files
committed
Improve display of prices over 1M
1 parent 7855d1a commit 6b10d3c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/models/home.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ def price_display
6060
return 'UNKNOWN PRICE' if price.zero?
6161

6262
# Assume monthly rental amount if < 10k
63-
if price > 10_000
63+
if price > 1_000_000
64+
#{price / 1_000_000.0}m"
65+
elsif price > 10_000
6466
#{price / 1000}k"
6567
else
6668
#{price} pcm"

0 commit comments

Comments
 (0)