I think the reason I'm not getting the link automatically is because
this controller is namespaced. It's not a 1-to-1 to the model name

On Feb 11, 5:06 am, "Sergio Cambra .:: entreCables S.L. ::."
<[email protected]> wrote:
> On Jueves, 11 de Febrero de 2010 05:49:22 Brian Cardarella escribió:
>
> > I don't think that works. That adds another column to be displayed.
> > What I'm looking for is a link to a has_many resource for that record.
>
> If it's a has_many association you should get a link to nested scaffold
> automatically. The partner_id will be in active_scaffold_constraints.
>
>
>
>
>
>
>
> > On Feb 10, 5:27 pm, Kenneth Ortmann <[email protected]> wrote:
> > > this is from the top of my head...
>
> > > in your partner controller add a column
> > > #this will add a new column that will be displayed on the index and show
> > > action but not the new/edit
> > > config.columns.add << :registration_link
> > > config.create.columns.exclude :registration_link
> > > config.update.columns.exclude :registration_link
>
> > > in your partner helper file do
> > > #this is just a helper method
> > > def link_for_registration(record)
> > >   #here you can create the url however you want, whether you create a
> > > route or what not, record.id gives you the partner id
> > >   # url = partner_registration_url(record.id)
> > >   # url = registration_url(:partner_id => record.id)
> > >   link_to "name", url
> > > end
> > > #this overrides the column to return the link in the list column
> > > def registration_link_column(record)
> > >   link_for_registration(record)
> > > end
> > > #this overrides the column for show
> > > def registration_link_show_column(record)
> > >   link_for_registration(record)
> > > end
>
> > > Is this kind of what you meant?
> > > ~Kenny
>
> > > On Wed, Feb 10, 2010 at 3:49 PM, Brian Cardarella
>
> <[email protected]>wrote:
>
>
>
>
>
> > > > Yes, for both the list and the show of each partner.
>
> > > > On Feb 10, 4:45 pm, Kenneth Ortmann <[email protected]> wrote:
> > > > > So on the partners list view are you wanting one link to the
>
> > > > registrations
>
> > > > > index action passing the partner_id?
>
> > > > > On Wed, Feb 10, 2010 at 3:37 PM, Brian Cardarella
> > > > > <[email protected]
>
> > > > >wrote:
> > > > > > Yup,
>
> > > > > > So we have a partner resource that is AS, with a nested
> > > > > > registration resource.
>
> > > > > > So each partner has_many :registrations
>
> > > > > > I'd like to have a link for every partner record to link to the
> > > > > > registration controller index action passing the partner_id
>
> > > > > > - Brian
>
> > > > > > On Feb 10, 4:32 pm, [email protected] wrote:
> > > > > > > Can you describe your problem with a little more detail?
> > > > > > > Sent from my Verizon Wireless BlackBerry
>
> > > > > > > -----Original Message-----
> > > > > > > From: Brian Cardarella <[email protected]>
> > > > > > > Date: Wed, 10 Feb 2010 13:26:09
> > > > > > > To: ActiveScaffold : Ruby on Rails plugin<
>
> > > > > > [email protected]>
>
> > > > > > > Subject: Active link params
>
> > > > > > > So I don't see how to use the current object's ID with an active
>
> > > > link.
>
> > > > > > > I must be missing it somewhere. Any help?
>
> > > > > > > --
> > > > > > > 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]<activescaffold%2Bunsubs
> > > > > >cr...@go oglegroups.com>
>
> > > > <activescaffold%2bunsubscr...@go oglegroups.com>
>
> > > > > > .
>
> > > > > > > For more options, visit this group athttp://
>
> > > > > > groups.google.com/group/activescaffold?hl=en.
>
> > > > > > --
> > > > > > 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]<activescaffold%2Bunsubs
> > > > > >cr...@go oglegroups.com>
>
> > > > <activescaffold%2bunsubscr...@go oglegroups.com>
>
> > > > > > .
> > > > > > For more options, visit this group at
> > > > > >http://groups.google.com/group/activescaffold?hl=en.
>
> > > > --
> > > > 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]<activescaffold%2Bunsubscrib
> > > >e...@go oglegroups.com> .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/activescaffold?hl=en.
>
> --
> Sergio Cambra .:: entreCables S.L. ::.
> Mariana Pineda 23, 50.018 Zaragoza
> T) 902 021 404 F) 976 52 98 07 E) [email protected]

-- 
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