Hobo 2 and Polymorphic models

25 views
Skip to first unread message

Bob Sleys

unread,
Oct 6, 2012, 1:19:45 PM10/6/12
to hobo...@googlegroups.com
I need to add the ability for multiple models to each have multiple attachments added to them. I know there is the plugin hobo_paperclip to do the actual attachments to a model so I could create an attachment model to hold the attachments but is it possible to use that model in a polymorphic relationship to multiple models in Hobo.  If a remember correctly this wasn't easily done in previous versions of Hobo so I was wondering that the current status was.  Or if anyone had any tips on how to get this to work.

Bob

Bryan Larsen

unread,
Oct 8, 2012, 2:55:30 PM10/8/12
to hobo...@googlegroups.com
I think we had STI cleaned up fairly well for 1.3. I haven't
specifically tested it for 2.0, but it should still work.

Bryan
> --
> You received this message because you are subscribed to the Google Groups
> "Hobo Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/hobousers/-/txNgQTWiaagJ.
> To post to this group, send email to hobo...@googlegroups.com.
> To unsubscribe from this group, send email to
> hobousers+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/hobousers?hl=en.

kevinpfromnm

unread,
Oct 8, 2012, 7:35:33 PM10/8/12
to hobo...@googlegroups.com
He didn't mention STI, but polymorphic relationships.  Those have been working for awhile.  Though the view code usually needs a bit of work to come out good.  I wrote up a tutorial in the hobo book on polymorphic comments. http://hobocentral.net/books/

I'm not sure if it's available in straight html or only the pdf.
Reply all
Reply to author
Forward
0 new messages