Skip to content

Instantly share code, notes, and snippets.

@wuputah
Created February 10, 2009 00:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wuputah/61108 to your computer and use it in GitHub Desktop.
Save wuputah/61108 to your computer and use it in GitHub Desktop.
#map.invoices 'customers/invoices/:date_from/:date_to.:format', :controller => 'customers', :action => 'invoices', :format => 'html', :date_to => Date.today
map.invoices 'customers/invoices/:date_from', :controller => 'customers', :action => 'invoices', :format => 'html', :date_to => Date.today
map.invoices 'customers/invoices/:date_from/:date_to.:format', :controller => 'customers', :action => 'invoices', :format => 'html'
## OR MAYBE? ##
map.invoices 'customers/invoices/:date_from.:format', :controller => 'customers', :action => 'invoices', :format => 'html', :date_to => Date.today
map.invoices 'customers/invoices/:date_from/:date_to.:format', :controller => 'customers', :action => 'invoices', :format => 'html'
# Also, the :format => 'html' is a bit unnecessary, I think...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment