Browse Source

Redirect user profile page to short URL when HTML format (#4328)

pull/4/head
Yamagishi Kazutoshi 6 years ago
committed by Eugen Rochko
parent
commit
ef16089c6d
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      config/routes.rb

+ 1
- 1
config/routes.rb View File

@ -26,7 +26,7 @@ Rails.application.routes.draw do
confirmations: 'auth/confirmations',
}
get '/users/:username', to: redirect('/@%{username}'), constraints: lambda { |req| req.format.nil? }
get '/users/:username', to: redirect('/@%{username}'), constraints: lambda { |req| req.format.nil? || req.format.html? }
resources :accounts, path: 'users', only: [:show], param: :username do
resources :stream_entries, path: 'updates', only: [:show] do

Loading…
Cancel
Save