Forum: Ruby on Rails passing parameter by 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.
incoroneta (Guest)
on 2007-06-29 16:46
Hi i've to pass the variable user.user_id by the function link_to to the
action show.
the code is:


<td><%= link_to 'Show', :action => 'show', :id => user.user_id %></td>

inside the action show the value of "id" is totally different from the
value contained in user.user_id

Maybe is only a stupid error.
Can anybody help me???
lanzm (Guest)
on 2007-06-29 16:54
(Received via mailing list)
I cant see anything wrong with your code. can you post the action you
use ?

On 29 Jun., 14:46, incoroneta <removed_email_address@domain.invalid>
incoroneta (Guest)
on 2007-06-29 18:11
sorry that problem is solved....

i've found that the problem occurs when i try to read the results of
find() function, and i've added another post.

http://www.ruby-forum.com/topic/113614#265391

thanks
This topic is locked and can not be replied to.