float to int rails code example
Example: convert float to int ruby
Try Float.round.
irb(main):001:0> 5.44.round
=> 5
irb(main):002:0> 5.54.round
=> 6
Try Float.round.
irb(main):001:0> 5.44.round
=> 5
irb(main):002:0> 5.54.round
=> 6