The problem with this is that from a users point of view it may not seem
silly to have a link to the parent and grandparent.

So from an active scaffold point of view, when you click on the parent link
you get a scaffold view for the child-parent relationship.  If you click on
grandparent you would get a scaffold view for the child-grandparent
relationship which doesn't "really" exist.

On Thu, May 14, 2009 at 1:46 PM, fattymelt <[email protected]> wrote:

>
>
>
> On May 14, 6:25 am, "Sergio Cambra .:: entreCables S.L. ::."
> <[email protected]> wrote:
> > On Miércoles, 13 de Mayo de 2009 17:33:48 fattymelt escribió:
> >
> >
> >
> > > On May 12, 4:09 am, "Sergio Cambra .:: entreCables S.L. ::."
> >
> > > <[email protected]> wrote:
> > > > El Friday 08 May 2009 23:58:23 fattymelt escribió:> I see no one ever
> > > > responded to this ->
> >
> > > > >http://groups.google.com/group/activescaffold/msg/6745982271cda82a
> >
> > > > > But I have the exact same issue. As the OP says, it must be a
> common
> > > > > problem, so I think I am missing some obvious solution. Thanks.
> >
> > > > Use a field override and call to_label.
> >
> > > So, I did this, but all I get is the String. I, and the OP, were
> > > hoping to get a link, just like you get with "single layer"
> > > associations.
> >
> > > Just to be clear, if I have:
> >
> > > class ApplicationInstance < ActiveRecord::Base
> > >    belongs_to :deployment
> > > end
> >
> > > class Deployment < ActiveRecord::Base
> > >    belongs_to :client
> > > end
> >
> > > class Client < ActiveRecord::Base
> > > end
> >
> > > When I am using "active_scaffold :application_instance" I can easily
> > > include the :deployment column to display and link to
> > > ApplicationInstance.Deployment, but I want to be able to add a :client
> > > column that displays and links to
> > > ApplicationInstance.Deployment.Client.  Your solution did allow me to
> > > display ApplicationInstance.Deployment.Client, but I would like to
> > > have it be a link.
> >
> > You can return a link in the field override instead of a string. There is
> no
> > automatic linking feature in ActiveScaffold for associations of
> associations
>
> Yes, this is what I have decided to do. I was hoping for a "inline"
> link, but I'm not sure I can make that happen. The only example of a
> link provided in the Field Overrides documentation is a popup link,
> via link_to.
>
> thanks.
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to