routes - Using Dashes for urls in ruby on rails -


i have view folder product_types. name of controller file product_types_controller , class have producttypescontroller. i'd keep _ format rails prefers need keep current page syntax search index reasons.

how controller show mysite.com/product-types , pages in folder product_types appear mysite.com/product-types/some-page? need name pages - or should use _ syntax , change routes.

this rails 2.3.8 site.

thanks

if you're using restful routes, can this:

map.resources :product_types, :as => 'product-types' 

i hope helps!


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -