title: Formtastic checkboxes not getting checked when editing resource, when using MongoMapper
body: <p>With the following Store and Service models, managed with MongoMapper:</p>
  
  <pre><code>class Store
    include MongoMapper::Document         
    key :service_ids, Array, :typecast =&gt; 'ObjectId'
    many :services, :in =&gt; :service_ids
  end
  
  class Service
    include MongoMapper::Document         
    key :name, String  
    many :stores, :foreign_key =&gt; :service_ids  
  end
  </code></pre>
  
  <p>I have this form, done with Formtastic:</p>
  
  <pre><code>&lt;%= semantic_form_for @store, :url =&gt; admin_store_path(@store), :method =&gt; :put do |form| %&gt;
    &lt;%= form.input :service_ids, :label =&gt; "Select Store Services", 
                                 :as =&gt; :check_boxes, 
                                 :collection =&gt; Service.all %&gt;
  &lt;% end -%&gt;
  </code></pre>
  
  <p>The controller uses Inherited Resources, and the edit action is implicit.</p>
  
  <p>When editing a @store with services already associated with it, the checkboxes for the latter don't show as checked. </p>
  
  <p><a href="https://github.com/justinfrench/formtastic" rel="nofollow">Formtastic's README</a> warns it doesn't support MongoMapper officially, but it also says people have been using both together successfully, and I've seen some examples of this online.</p>
  
  <p>I suspect <a href="https://github.com/josevalim/inherited_resources" rel="nofollow">Inherited Resources</a> also doesn't support it, from what I've seen from Devise + Simple Form, both from the same authors and which don't support MM. They're working towards using an ORM adapter in their gems, but it isn't ready yet AFAIK.</p>
  
  <p>And I've had problems with it already, I'm overriding the update action to get it to work:</p>
  
  <pre><code>  def update
      store = Store.find(params[:id])    
      if store.update_attributes!(params[:store])
  
        flash[:notice] = 'Store was successfully updated.'
        redirect_to admin_store_path(store)
      else
        redirect_to new_store_path
      end
    end  
  </code></pre>
  
  <p>Does anybody know where the conflict with MM is, either in Formtastic or IR, and a hack just to get these checkboxes checking?</p>