Skip to content

Instantly share code, notes, and snippets.

@jonathansimmons
Created December 13, 2012 20:12
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 jonathansimmons/4279401 to your computer and use it in GitHub Desktop.
Save jonathansimmons/4279401 to your computer and use it in GitHub Desktop.
Add this to your routes.rb to account for periods in a username. (i.e http://website.com/jonathan.simmons)
scope ":username", :constraints => { :username => /[0-9A-Za-z\.]+/ }, :as => :user do
match '/' => 'users#profile', as: :profile
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment