I am trying to find out a data type of a certain variable (it is a column in a db in RoR application). I would like to format it as a number with 2 decimals, but I want to first find out if it is a string or an integer.
- How can I find out?
- How can I change it? (And do I need to)
- How do I format it to two decimals, whatever the original is?
- What is the best way to go about this - change it in css? in js? in the variable type?