浏览代码

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

master
Yamagishi Kazutoshi 6 年前
committed by Eugen Rochko
父节点
当前提交
ef16089c6d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      config/routes.rb

+ 1
- 1
config/routes.rb 查看文件

@@ -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


正在加载...
取消
保存