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.
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 <rails-mailing-l...@andreas-s.net>
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.

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

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