0

I enter a number with a decimal to this update, yet it comes out as a .floor'd Integer no matter what I try. I've tried 161.55.to_f and a few other fixes but nothing is working.

class UsersController < ApplicationController

    def update
        user = User.find(params[:id])
        user.update(user_current_balance: 161.55)        
    end

end

How can I update my user_current_balance to have a number rounded to the nearest hundredth decimal place?

atack
  • 55
  • 8

0 Answers0