diff options
Diffstat (limited to 'config/routes.rb')
-rw-r--r-- | config/routes.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/config/routes.rb b/config/routes.rb index ea766e1b3..cf8364968 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -24,6 +24,8 @@ Rails.application.routes.draw do confirmations: 'auth/confirmations', } + get '/users/:username', to: redirect('/@%{username}'), constraints: { format: :html } + resources :accounts, path: 'users', only: [:show], param: :username do resources :stream_entries, path: 'updates', only: [:show] do member do @@ -43,6 +45,9 @@ Rails.application.routes.draw do end end + get '/@:username', to: 'accounts#show', as: :short_account + get '/@:account_username/:id', to: 'statuses#show', as: :short_account_status + namespace :settings do resource :profile, only: [:show, :update] resource :preferences, only: [:show, :update] @@ -129,6 +134,8 @@ Rails.application.routes.draw do get '/timelines/public', to: 'timelines#public', as: :public_timeline get '/timelines/tag/:id', to: 'timelines#tag', as: :hashtag_timeline + get '/search', to: 'search#index', as: :search + resources :follows, only: [:create] resources :media, only: [:create] resources :apps, only: [:create] @@ -187,8 +194,5 @@ Rails.application.routes.draw do root 'home#index' - get '/:username', to: redirect('/users/%{username}') - get '/:username/:id', to: redirect('/users/%{username}/updates/%{id}') - match '*unmatched_route', via: :all, to: 'application#raise_not_found' end |