So I renamed my "docid" field to "name", figuring it would be easier to change the way it displays in dryml rather than try to fight with Hobo. Everything's peachy again, though I'm curious about this error.
Andy > -----Original Message----- > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of Andy Orahood > Sent: Wednesday, October 29, 2008 4:36 PM > To: Hobo Users > Subject: [Hobo Users] AR error submitting an edit form with a has_many > :through model without a "name" field > > > My edit form is for a model called List that has_many Docs through > ListItems. My Doc model does not have a name or title field, so in the > Docs: select drop-down they appear as Doc 1, Doc 2, Doc 3. When I > submit the form I get the following error: > > ActiveRecord::AssociationTypeMismatch (Doc expected, got String): > /vendor/plugins/hobo/lib/active_record/association_proxy.rb:20:in > `raise_on_type_mismatch' > > Request Parameters: > > {"list"=>{"name"=>"A really great new list", > "docs"=>["", > "Doc 14650", > "Doc 14642", > "Doc 14611"], > "owner_id"=>"1"}, > "page_path"=>"lists/edit", > "_method"=>"PUT", > "authenticity_token"=>"fce789fa7144a16f69c34d3d549fd666cc60d1ca", > "id"=>"1-a-really-great-new-list"} > > With a name field on Doc, no error. Any ideas what's going on? > > Thanks, > Andy > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/hobousers?hl=en -~----------~----~----~----~------~----~------~--~---
