search for: players_url

Displaying 1 result from an estimated 1 matches for "players_url".

2008 Feb 16
2
nil error?
...e(odds) @odds = odds end def winGame @odds += 1 end (note: attr_reader makes the odds in the index list disappear from view.) in the controller I have: def winner player = Player.find(params[:id]) player.winGame respond_to do |format| format.html { redirect_to(players_url) } format.xml { head :ok } end end and in the view I have: <td><%= link_to ''Win Game'', :action => "winner", :id => player %></td> This results in: You have a nil object when you didn''t expect it! You might have expected a...