mercredi 15 avril 2015

URL is missing when using dash in rails, how to solve it?

I am using rails4. I want to use dash(-) in my url, like /specials-race. I used the code like



root 'static_pages#index'
match '/', to: 'static_pages#index', via: 'get'
match '/services', to: 'static_pages#services', via: 'get'
match '/schedule', to: 'static_pages#schedule', via: 'get'
match '/specials-race', to: 'static_pages#specials_race', via: 'get'


But the problem is when I use this my ulr disappear. How can I get back my url when using dash? I am attaching am image of routing error.


enter image description here You can see the url of /specials-race is missing.


Aucun commentaire:

Enregistrer un commentaire