how to add a string to the path in link_to of ruby on rails -
for example have code:
<%= link_to "start", start_path(:id=>1,:box=>1)%>
the id
, box
parameters right? , example, generated url: http://localhost:3000/start?id=1&box=1
how can add string it, make this:
use :anchor
key:
<%= link_to "start", start_path(:id => 1, :box => 1, :anchor => 'box_1')
and answer first question, yes, id
, box
parameters. passed in request part of params
hash.
Comments
Post a Comment