如何使用redirect_to将hash参数添加到url?
如何使用redirect_to将hash参数添加到url?
例如:
http:// localhost / products /#{page:2 }
使用类似的东西
redirect_to url_for(:action=>:index)+"#order"
最好的办法是。
redirect_to :action => :index, :anchor => "order"
如何使用redirect_to将hash参数添加到url?
例如:
http:// localhost / products /#{page:2 }
使用类似的东西
redirect_to url_for(:action=>:index)+"#order"
最好的办法是。
redirect_to :action => :index, :anchor => "order"