E
E
eldar_web2019-09-13 17:54:27
Ruby on Rails
eldar_web, 2019-09-13 17:54:27

How to redirect to / in Rails?

Added to application.rb:

config.action_controller.default_url_options = { trailing_slash: true }

Now all urls are generated with an ending in /
But how to redirect to a url ending in / if they visit without it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question