ruby on rails - How can I route to a page any time no route is available? -


i want make simple page button odd case user enters url page there not route for.

for instance, route foo is:

resources :foos, :except => [:index] 

the user enters:

mysite.com/foos 

i want display page says "this page doesn't exist" , button.

where put html.erb file , how account in routes.rb?

thanks

at end of routes.rb write:

match '*path', :controller => 'some_controller', :action => 'some_action' 

or

match '*path' => 'some_controller#some_action' 

source:

rails handle 404 url redirect


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -