I'm having an issue with the forms and the money gem.

This is my problem:

  1. I create a record which has an "amount" field (mapped to money object). Let's say I enter 10 (dollars).
  2. The money gem converts it to 1000 (cents)
  3. I edit the same record and the form pre-populates the amount field as 1000
  4. 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
Edit
Report