The Question now is how do i attach a case to the user model upon creating a user in a create user form without triggering the error? if never_show:caseable is removed?
dennis On Thu, Mar 10, 2011 at 10:26 AM, Dennis saka <[email protected]> wrote: > Hi > > Thanks Matt, I'm inclined to side with you on that suspicion, i added > the never_show :caseable to the model and sure enough the error > disappears. > > dennis > > On Wed, Mar 9, 2011 at 5:03 PM, Matt Jones <[email protected]> wrote: >> >> On Mar 8, 2011, at 8:35 AM, Dennis saka wrote: >> >>> Hi >>> >>> Im getting this error when i click on the new case link when trying to >>> create an new case in polymophic associations (im using the "hobo", >>> ">= 1.3.0.pre29" gem >>> >>> ActionView::Template::Error (wrong model name: "active_record/base" >>> (extracted from translation key: "active_record/base.message.no"). You >>> might want to use the translate/t >>> >>> Hobo::I18nError in Cases#new >>> >>> Showing controller: cases; dryml-tag: new-page where line #1 raised: >>> >>> wrong model name: "active_record/base" (extracted from translation >>> key: "active_record/base.message.no"). You might want to use the >>> translate/t tag/method instead. >> >> I suspect this is caused by new-page trying to render a select menu for the >> :caseable association - which is ultimately not possible, since it could >> point pretty much anywhere. >> >> If you add never_show :caseable to the model (for testing), does the error >> still appear? >> >> One further note: the migration generator will correctly generate the >> caseable_id and caseable_type fields (so you don't need them in the fields >> block), but it currently doesn't generate counter cache fields (so you'll >> need case_count in the block on User). That's not directly relevant here, >> but worth noting. >> >> --Matt Jones >> >> -- >> 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. >> >> > -- 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.
