I have a real number column (“real”) in Postgres and I think it might be
being treated as a
boolean. In my template I have:
<%= number_with_precision(item.vote_average, 2) %>
and it’s outputting 1.00 for everything (they’re not all 1’s in the
database). Actually, I have to
enclose that code in begin…rescue otherwise I get an “undefined method
‘to_f’” if
item.vote_average is 0 in the database.
what’s happening?
csn