I got i working using your tag, and this additional change:
<extend tag="index-page" for="Asset">
<old-index-page merge>
<collection: replace>
<collection with="&Asset.all"
join=","><card:filable/></collection>
</collection:>
</old-index-page>
</extend>
Don't know why i should replace the original collection. Do you know
what is called in auto-rendered collection-tag, because i don't think
its Asset.all
On 19 Jul., 20:28, kevinpfromnm <[email protected]> wrote:
> You should be able to just define the asset card to replace with the
> filable card.
>
> <def tag="card" for="Asset">
> <card:filable />
> </def>
>
> make sure the card tags defined for each of the filable models make
> sense too. a picture or video might not have any of the fields that
> get included on a default card for instance.
>
> On Jul 19, 12:11 pm, Mikkel WF <[email protected]> wrote:
>
>
>
> > Hello
>
> > I've made a polymorphic model, Asset, which can have different asset
> > associated to it (Images, Videos, etc), accessible via the filable
> > attribute.
>
> > class Asset
> > ...
> > belongs_to :filable, :polymorphic => true
> > end
>
> > I can render a collection of asset just a i've always been able to,
> > and inside the asset card i can render both a link to the specific
> > filable element and the filable type.
>
> > So how can i:
>
> > 1. render the card of the joined asset inside the asset card?
> > 2. substitute the entire content of the asset card with the joined
> > card?
>
> > Hope i've been specific enough in describing my problem. I have tried
> > to render the card using the <card:filable /> and <card
> > with="&this.filable" /> inside the card body-tag, but it only renders
> > an empty div.
--
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.