标签: ruby-on-rails ruby-on-rails-3
如何使用redirect_to将哈希参数添加到网址?
例如:
http://localhost/products/#{page:2}
答案 0 :(得分:30)
最好的办法是。
redirect_to :action => :index, :anchor => "order"
答案 1 :(得分:-6)
使用类似
redirect_to url_for(:action=>:index)+"#order"