问题
I have a problem with HighVoltage when I try to link to anchor on the static page. In the URL I am receiving '%23' instead of '#'.
Example
<%= link_to 'xxx', page_path('xxx#yyy') %>
gives in the URL:
http://localhost:3000/pages/xxx%23yyy
Can somebody give ma a hint how it can be solved, as I did not find any related information in the gem documentation.
回答1:
You must need to and the param anchor, for example:
link_to "About", page_path('index', anchor: "about")
来源:https://stackoverflow.com/questions/33025694/rails-highvoltage-gem-link-with-anchor