Forum: Ruby on Rails anyway to dry this up?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Rob S. (Guest)
on 2007-04-06 08:27
(Received via mailing list)
Is there a way to take this common route pattern:

  map.category '/by/:type/:category', :controller => 'category',
:action => 'show', :page_number => '1'
  map.connect '/by/:type/:category/page/:page_number', :controller =>
'category', :action => 'show', :page_number => /\d+/

And do it with one line?

btw, this allows /by/type/people (for page 1, implicit), and
/by/type/people/page/xx (for pages after 1).

- Rob
This topic is locked and can not be replied to.