summaryrefslogtreecommitdiff
path: root/config/routes.rb
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2014-05-13 09:51:36 +0200
committerAzul <azul@leap.se>2014-05-13 09:51:41 +0200
commit86eb9062f1e81302647bf18ce0f5fd981202b68a (patch)
treea1d63177b67c11e71f53c400cd9424588be1a7ec /config/routes.rb
parent726244f1c6bb72fb53a257c084dfbdf7b9c2b03c (diff)
allow for usernames with dots
preparing for #5664 with some test improvements i ran into this issue This commit includes a fix and the test improvements. In particular it adds BrowserIntegrationTest#login - so there is no need to go through the signup procedure everytime you want a user to be logged in.
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/config/routes.rb b/config/routes.rb
index f612b47..745b97d 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -20,7 +20,8 @@ LeapWeb::Application.routes.draw do
namespace "api", { module: "v1",
path: "/1/",
defaults: {format: 'json'} } do
- resources :sessions, :only => [:new, :create, :update]
+ resources :sessions, :only => [:new, :create, :update],
+ :constraints => { :id => /[^\/]+(?=\.json\z)|[^\/]+/ }
delete "logout" => "sessions#destroy", :as => "logout"
resources :users, :only => [:create, :update, :destroy, :index]
resources :messages, :only => [:index, :update]