I'm having an issue with the forms and the money gem.
This is my problem:
- I create a record which has an "amount" field (mapped to money object). Let's say I enter 10 (dollars).
- The money gem converts it to 1000 (cents)
- I edit the same record and the form pre-populates the amount field as 1000
- If I save the record without changing anything, it will convert the 1000 (dollars) to 100000 (cents)
How do I make it display the pre-populated amount in dollars instead of cents?
Edit:
I tried editing the _form.html like this:
= f.text_field(:amount, :to_money)
and I get this error:
undefined method `merge' for :to_money:Symbol