Get anchor part of URL in controller in Ruby on Rails May 27, 2023 by Tarik You can’t do that in Rails, because the anchor is not sent to the server. See mikeduncan.com/?s=named+anchors