Problems in Ruby

  • How to make link_to able to be opened in the new page
  • When the link_to use controller and action, target='_blank' doesn't work (Ruby will pass '?target=_blank' as the parameter of the hyperlink). the following code should be used:

    <tr><td><%= link_to "Play", {:controller => 'giveagame', :action => 'index'}, :target=>'_blank'  %></td></tr>