Skip to content

Instantly share code, notes, and snippets.

@robbyrussell
Created March 10, 2009 01:48
Show Gist options
  • Select an option

  • Save robbyrussell/76613 to your computer and use it in GitHub Desktop.

Select an option

Save robbyrussell/76613 to your computer and use it in GitHub Desktop.
# aiming to have something like:
# link_to(article.title, article_path(article))
# and build out /articles/2009/03/10/foo-bar-baz
#
map.article 'articles/:year/:month/:day/:permalink', :controller => 'articles', :action => 'show',
:year => /\d{4}/, :day => /\d{1,2}/, :month => /\d{1,2}/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment