diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-10-05 15:21:27 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-10-05 15:21:27 +0300 |
commit | f223a41660f1a629614d3d559468b1a5488b96d8 (patch) | |
tree | f253bba0103d951980811f0563bc7c07657d2fdc /config/routes/user.rb | |
parent | 3fd5ea3d4362e6946f8502bb30825cc14013b374 (diff) |
Split routes on multiple files
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'config/routes/user.rb')
-rw-r--r-- | config/routes/user.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/config/routes/user.rb b/config/routes/user.rb new file mode 100644 index 00000000000..b6a6a07e3c4 --- /dev/null +++ b/config/routes/user.rb @@ -0,0 +1,26 @@ +scope(path: 'u/:username', + as: :user, + constraints: { username: /[a-zA-Z.0-9_\-]+(?<!\.atom)/ }, + controller: :users) do + get :calendar + get :calendar_activities + get :groups + get :projects + get :contributed, as: :contributed_projects + get :snippets + get '/', action: :show +end + +devise_for :users, controllers: { omniauth_callbacks: :omniauth_callbacks, + registrations: :registrations, + passwords: :passwords, + sessions: :sessions, + confirmations: :confirmations } + +devise_scope :user do + get '/users/auth/:provider/omniauth_error' => 'omniauth_callbacks#omniauth_error', as: :omniauth_error + get '/users/almost_there' => 'confirmations#almost_there' +end + +# Get all keys of user +get ':username.keys' => 'profiles/keys#get_keys', constraints: { username: /.*/ } |