Prettier account and stream entry URLs
This commit is contained in:
		
					parent
					
						
							
								33fac87e81
							
						
					
				
			
			
				commit
				
					
						d6ed2eb512
					
				
			
		
					 8 changed files with 53 additions and 11 deletions
				
			
		|  | @ -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] | ||||
|  | @ -189,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 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue