Easy way to convert URL back to route name?

Alternatively, you can just use the current_page? method:

if current_page? foo_url
  #do some ish
elsif current_page? bar_url
  # other stuff...

pharrington wrote:

Alternatively, you can just use the current_page? method:

if current_page? foo_url
  #do some ish
elsif current_page? bar_url
  # other stuff...

Hey, I like that too -- thanks!

-dave

One final thing - you can also pass extra params in :requirements -
thus:

map.resource :foos, :requirements => { :extra => 'foo' }

will add :extra => 'foo' to the incoming params. I'm not 100% sure if
this works on map.connect style routes, but if it doesn't, it's
probably a bug.

--Matt Jones