Is there any way to convert both integer and float values in rails?

前端 未结 0 1604
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-05 13:27

I have values which will have both integer or float, for example a = 1.0 and b = 2.56. Now, I want to have a = 1 and b = 2.56. How to round off only when value contains inte

相关标签:
回答
  • 消灭零回复
提交回复
热议问题