Here is how I ended up solving it (thanks to everyone)
In routes.rb
<code>
map.inbox '/inbox', :controller => 'tasks', :action =>
'task_list', :state =>'inbox'
map.actions '/actions', :controller => 'tasks', :action =>
'task_list', :state =>'actions'
map.waiting '/waiting', :controller => 'tasks', :action =>
'task_list', :state =>'waiting'
map.someday '/someday', :controller => 'tasks', :action =>
'task_list', :state =>'someday'
map.ticklers '/ticklers', :controller => 'tasks', :action =>
'task_list', :state =>'ticklers'
map.reference '/reference', :controller => 'tasks', :action =>
'task_list', :state =>'reference'
</code>
In tasks_controller.rb, there is a task_list method
Thanks again to everyone for your help!!
--Alan
A bit simpler as:
map.with_options :controller => 'tasks', :action =>'task_list' do |tasks>
tasks.inbox '/inbox', :state =>'inbox'
tasks.actions '/actions', :state =>'actions'
tasks.waiting '/waiting', :state =>'waiting'
tasks.someday '/someday', :state =>'someday'
tasks.ticklers '/ticklers', :state =>'ticklers'
tasks.reference '/reference', :state =>'reference'
end
and you still get the named routes.
Or, junk having separate named routes and just do:
map.task_list '/:state', :controller => 'tasks', :action =>'task_list',
:requirements => { :state => /\A(inbox|actions|waiting|someday|ticklers>reference)\z/ }
and use it in a view like:
task_list_path(:state => 'inbox')
and in your controller:
params[:state]
-Rob