I misunderstood you, I can try to help you tomorrow, if you don't figure it out 
shoot me or the list another email in the morning
Sent from my Verizon Wireless BlackBerry

-----Original Message-----
From: Brian Cardarella <[email protected]>
Date: Wed, 10 Feb 2010 20:49:22 
To: ActiveScaffold : Ruby on Rails plugin<[email protected]>
Subject: Re: Active link params

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.

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%2bunsubscr...@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%2bunsubscr...@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%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].
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].
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en.

Reply via email to