Forum: Ruby on Rails passing parameter by link_to

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
D97d7978720612c63dc899ad4b25b5b3?d=identicon&s=25 incoroneta (Guest)
on 2007-06-29 14: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???
15eb647956921a6bc9655c3513feb139?d=identicon&s=25 lanzm (Guest)
on 2007-06-29 14: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 <>
D97d7978720612c63dc899ad4b25b5b3?d=identicon&s=25 incoroneta (Guest)
on 2007-06-29 16: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.

This topic is locked and can not be replied to.