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.
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.

This topic is locked and can not be replied to.