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%[email protected]> > <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%[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]<activescaffold%[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.
