It would be nice to be able to define a redirect from one route to another from the
router.ex file. E.g.:
redirect "/", UserController, :list get "/users", UserController, :list
This is typically needed when you have a URL that you want the user to be able to type but that should be redirected to a more specific URL.
Ofc I can code an action and a redirect myself, but such a helper would avoid me to add that code that could be explicitly defined in the router; you can then quickly see that there is a redirect along with the other routes, without inspecting the controller’s code. I think such redirects without any logic belongs there.
What do you think about that idea?