Written by Sean Behan on Fri Jun 22nd 2012

Use an asterisk in the pattern to match for everything after it. In the example below, date will be available in the params hash as params[:date].

SPB::Application.routes.draw do
  # http://example.com/calendar/2007/10 
  # params[:date] => "2007/10"
  match '/calendar/*date' => 'events#index', as: 'month'
end

Tagged with..
#ruby on rails #routes #code samples

Just finishing up brewing up some fresh ground comments...