Skip to content

Instantly share code, notes, and snippets.

@davinmsu
Created January 12, 2014 12:01
Show Gist options
  • Save davinmsu/8383765 to your computer and use it in GitHub Desktop.
Save davinmsu/8383765 to your computer and use it in GitHub Desktop.
negative constraints for rails routing
match '/:id', to: 'refinery/blog/categories#show', constraints: { id: /(?!.*?refinery).*/ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment