Need help for my link_to


#1

I have a model Document that shares the same primary id with another
model Upload, I would like to put a link on _list.rhtml of my
document to edit the upload of the same id.
I tried something like <%= link_to ‘Edit’, {:controller => upload,
:action => ‘edit’, :id => document} %> but obviously that’s wrong. Any
idea how to make it right?

thanx in advance

Pat


#2

On 5/13/06, Patrick A. removed_email_address@domain.invalid wrote:

I have a model Document that shares the same primary id with another
model Upload, I would like to put a link on _list.rhtml of my
document to edit the upload of the same id.
I tried something like <%= link_to ‘Edit’, {:controller => upload,
:action => ‘edit’, :id => document} %> but obviously that’s wrong. Any
idea how to make it right?
that’s ok I found it it’s something like:
<%= link_to ‘Edit’, {:controller => ‘/upload’, :action => “edit”, :id
=> document.id}, :popup=>[‘new_window’,‘height=130,width=350’] %>