Forum: Ruby on Rails need help for my link_to

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Patrick A. (Guest)
on 2006-05-13 19:47
(Received via mailing list)
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
Patrick A. (Guest)
on 2006-05-13 20:48
(Received via mailing list)
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'] %>
This topic is locked and can not be replied to.