Very beginner's question: I noticed that there's no .to_d (such as order.price.to_d to convert order.price into a decimal). Say order.price is currently a string; can I then use order.price.to_i to convert it into a decimal?
views:
81answers:
1
+6
A:
The Ruby corelib documentation is your friend!
>> "9.95".to_f
=> 9.95
>> "9.95".to_f.class
=> Float
>>
Edwin V.
2009-10-09 09:14:09
Awesome! Thank you Edwin!!
Drew
2009-10-09 09:14:43