I am attempting
get ":site_name", to: 'public_site#index'
hoping that
get("/catsfrommars").should route_to("public_site#index")
Unfortunately I am getting the :site_name routed as an action:
No route matches {:controller=>"public_site", :action=>"/catsfrommars"}
I also tried
get "/:site_name", to: 'public_site#index'
get "(:site_name)", to: 'public_site#index'
And the :site_name parameter still gets routed as an action on the specified controller.
Any ideas on how to fix this and get :site_name as a parameter?
Edit: I am trying to do something similar to this: Rails Routing Question: Mapping Slugs/Permalinks Directly under Root? but with Rails4 syntax. Once I get it working, I'll use constraints to isolate the namespaced app routes.