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.
997433f165140d58f52b8c0d1d005dc1?d=identicon&s=25 Patrick Aljord (Guest)
on 2006-05-13 17: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
997433f165140d58f52b8c0d1d005dc1?d=identicon&s=25 Patrick Aljord (Guest)
on 2006-05-13 18:48
(Received via mailing list)
On 5/13/06, Patrick Aljord <patcito@gmail.com> 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.