Get anchor part of URL in controller in Ruby on Rails

后端 未结 2 979
醉梦人生
醉梦人生 2020-11-30 04:49

Is there a way to get the anchor part of a URL in a controller?

Example: if I type http://www.foo.com/bar#anchor123 can I get the string anchor123 in my controller?<

2条回答
  •  孤城傲影
    2020-11-30 04:58

    You can't do that in Rails, because the anchor is not sent to the server. See mikeduncan.com/?s=named+anchors

提交回复
热议问题