Defaults in routes

Hello,

I have a routes question regarding defaults. If I have a route defined
as follows…

map.connect ‘events/:year/:month’,
:controller => ‘events’,
:action => ‘index’,
:defaults => {
:year => Date.today.year,
:month => Date.today.month
}

and I generate a route with these options…
{:controller => ‘events’, :action => ‘index’, :year => Date.today.year,
:month => Date.today.month}

The resulting url is “/events” and doesn’t include the year and month.
I want the url to include the year and the month ("/events/2007/11"),
but still use the defaults if they’re not provided for use in my
controller.

Basically, if I supply the additional parameters, I want them in the
generated url and if I don’t include the additional parameters, I’d
still like the defaults to be set for my action.

Is this possible with routes or do I have to check the params in the
action myself and set the proper defaults if they don’t exist?

Thanks,
Andrew