title: accepts_nested_attributes
body: <p>I'm trying to use a comment style model which is attached to another model but I keep getting the error:</p>
  
  <pre><code>Review(#2171315060) expected, got Array(#2148226700) 
  </code></pre>
  
  <p>With params:</p>
  
  <pre><code>   Processing PlacesController#create (for 127.0.0.1 at 2010-04-15 18:57:02) [POST]
        Parameters: {"commit"=&gt;"Submit", "action"=&gt;"create", "destination_id"=&gt;"3243", "controller"=&gt;"places", "place"=&gt;{"address"=&gt;"sdfsdf", "name"=&gt;"dssfs", "lng"=&gt;"", "reviews"=&gt;{"content"=&gt;"sdfsdfsdfsd"}, "website"=&gt;"sdfsdf", "city_id"=&gt;"3243", "lat"=&gt;"", "place_type"=&gt;"1"}}
  </code></pre>
  
  <p>I have this in the parent model</p>
  
  <pre><code>  has_many :reviews, :as =&gt; :reviewable, :dependent =&gt; :destroy
    accepts_nested_attributes_for :reviews
  </code></pre>
  
  <p>And this in the Review model</p>
  
  <pre><code>  belongs_to :reviewable, :polymorphic =&gt; true
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>I have something exactly like this working with photos... also polymorphic which works fine.  The only difference I can see is that I've nested this model, so the form looks like this: </p>
  
  <pre><code>&lt;% form_for :place, :url =&gt; destination_places_path(@city), :html =&gt; { :multipart =&gt; true } do |f| %&gt;
  </code></pre>
  
  <p>I've also noticed that in the example I have that works, the output looks like this:</p>
  
  <pre><code>{"article"=&gt;{"photos_attributes"=&gt;{"1271403114089"=&gt;{"data"=&gt;#&lt;File:/var/folders/9b/9b3G5CRzGk0okD2UGi-hvE+++TI/-Tmp-/RackMultipart20100416-26553-177jk7b-0&gt;}}, "title"=&gt;"dsfdfs", "excerpt"=&gt;"", "content"=&gt;"&lt;p&gt;\r\n\tsdfsdf&lt;/p&gt;\r\n", "tag_list"=&gt;"lala,lah"}, "commit"=&gt;"Save", "action"=&gt;"create", "controller"=&gt;"articles"}
  </code></pre>
  
  <p>Compared to the one that doesn't:</p>
  
  <pre><code>{"commit"=&gt;"Submit",
   "destination_id"=&gt;"1461",
   "place"=&gt;{"name"=&gt;"sdfasdf",
   "address"=&gt;"asdfasdf",
   "photos"=&gt;{"data"=&gt;#&lt;File:/var/folders/9b/9b3G5CRzGk0okD2UGi-hvE+++TI/-Tmp-/RackMultipart20100416-26553-8edo05-0&gt;},
   "lng"=&gt;"",
   "website"=&gt;"asdfasdfs",
   "reviews"=&gt;{"content"=&gt;"asdfasdf"},
   "city_id"=&gt;"1461",
   "place_type"=&gt;"1",
   "lat"=&gt;""}}
  </code></pre>
  
  <p>I.e. one has MODELNAME_attributes vs MODELNAME... and i'm not sure why?  The form seems to be the same with the one exception of the nesting?</p>