I am having an issue where the global variable, $r, which i declared in
the controller is being overwritten by my code which is in a view:
<%= link_to 'Picks test1', game_pick_page_path, :onclick => $r = 1 %>
<%= link_to 'Picks test2', game_pick_page_path, :onclick => $r = 2 %>
The first $r = 1 is overwritten by $r = 2 making the value 2 even if i
click picks test1. i want it to just set $r to which every value is
associated with the link the user clicks.
Any ideas on how to make this happen would be greatly appreciated.