I wanted to create some basic html pages to add to my rails app.
I figured the restful way to do it would be to create a controller. The problem is I’d like the pages to be a two word title. => ex. www.example.com/foo-bar/
For SEO reasons it really must be two words, and I need the separation, using www.example.com/foobar/ would be a last resort
The problem is I cant script/generate controller foo-bar because the of the dash.
Is there any kind of workaround for this?
Does an underscore work for you? You can simply:
Your controller class name will be
FooBarController, and the default route would map it to something likehttp://www.example.com/foo_bar/abc....