I want my urls to use dash -
instead of underscore _
as word separators. For example controller/my-action
instead of controller/my_action
.
I'm surprised about two things:
- Google et al. continue to distinguish them.
- That Ruby on Rails doesn't have a simple, global configuration parameter to map
-
to_
in the routing. Or does it?
The best solution I've is to use :as
or a named route.
My idea is to modify the Rails routing to check for that global config and change -
to _
before dispatching to a controller action.
Is there a better way?