当我使用此网址时:
http://localhost:3000/case/index?id=14
我可以使用params[:id]
但是当URL为:
时http://localhost:3000/case/index#tabs-1?id=14
使用params[:id]
因为#tabs-1
。这样做有其他选择吗?
答案 0 :(得分:1)
请改用:
http://localhost:3000/case/index?id=14#tabs-1
查询字符串应紧跟在路径之后。