Add A Page Link / Anchor To A Rails Resource in routes.rb
0
In my routes.rb I have a route: resources :chat-messages Any time a visitor hits /chat-messages I would like the page to load a view with the following url: /chat-messages#example . This will scroll the page to a div with the id of example . Is there any way to handle this purely within routes.rb , so that a link that uses chat_messages_path will still render the url including the anchor?
ruby routes ruby-on-rails-5
share | improve this question
asked Nov 19 '18 at 17:41
Undistraction Undistraction
21k 34 137 239