title: How to use money gem with form builder properly?
body: <p>I have model Product with fields price_cents and price_currency. Money default currency is USD.</p>
  
  <p>Model:</p>
  
  <pre><code>class Product &lt; ActiveRecord::Base
    CURRENCIES = %w(USD EUR)
  
    composed_of :price,
                :class_name =&gt; "Money",
                :mapping =&gt; [%w(price_cents cents), %w(price_currency currency_as_string)],
                :constructor =&gt; Proc.new { |cents, currency| Money.new(cents || 0, currency || Money.default_currency) },
                :converter =&gt; Proc.new { |value| value.respond_to?(:to_money) ? value.to_money : raise(ArgumentError, "Can't convert #{value.class} to Money") }
  end
  </code></pre>
  
  <p>Form:</p>
  
  <pre><code>= form_for @product do |f|
    = f.label :price
    = f.text_field :price
    = f.select :price_currency, Product::CURRENCIES
  
    = f.submit
  </code></pre>
  
  <p>Controller Create method: @product = Product.new(params[:product])</p>
  
  <p>Problem: When user sets price field to 100 for example and price_currency to EUR it creates price using default currency(USD). How I can fix it? Is it possible to do it in view or i should do it in controller (e.g. @product.price.currency = ...)?</p>