ruby on rails - Controller to match root routes -


i want have controller active @ root of application, so:

www.example.com/1 return post id of 1 in foo controller.

how can this?

get '/:id', :controller => 'foo', :action => 'show' 

seems work. best way it?


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -