Skip to content

Instantly share code, notes, and snippets.

@EricLondon
Created March 19, 2012 13:22
Show Gist options
  • Save EricLondon/2111910 to your computer and use it in GitHub Desktop.
Save EricLondon/2111910 to your computer and use it in GitHub Desktop.
Rails route that works with: http://localhost:3000/posts/tag/Drupal%205.x
# I created a Post controller to accept a parameter for tag name.
# The problem is, the tag "Drupal 6.x", or anything with a period was triggering :format
get 'posts/tag/:tag' => 'posts#tag', :format => false, :constraints => {:tag => /.*/}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment