This is how you would usually do it:
link_to 'Click', my_path(anchor: 'sometext')
Your routes don’t have much to do with it, since the anchor part (#something) is not transferred to the server, it’s a pure client-side thing.
This is how you would usually do it:
link_to 'Click', my_path(anchor: 'sometext')
Your routes don’t have much to do with it, since the anchor part (#something) is not transferred to the server, it’s a pure client-side thing.