Thanks Kevin.
Yep, I know there are better, more in-depth modelling that would be
appropriate, but I'm just putting that off until I can get around Hobo
a little faster.
However, I had momentarily overlooked the fact that Hobo *IS* Rails,
and so simply did this:
<def tag="Fields-ByType">
<% case @document.doctype when 'Image': -%>
<DocumentImage-fields/>
<% when 'Text': -%>
<DocumentText-fields/>
<% else -%>
<field-list fields="name" param/>
<% end -%>
</def>
then simply called <FieldsByType> inside my extended form.
A nice blend that works like a charm and keeps it simple.
Tim
On May 24, 1:44 pm, kevinpfromnm <[email protected]> wrote:
> Ok... so you've got one model that's got 5 rows of which none are
> common between the two types? I'm not sure why you'd want to shoehorn
> that in like that. I would guess you've got some other model you want
> to interchangeably relate to both types? Either polymorphic
> relationship or a named_scope to load multiple associations at once
> would work better if this is the case.
>
> On May 21, 9:36 pm, tjg <[email protected]> wrote:
--
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.