2015-07-08 10:24:41 -04:00
|
|
|
Rails.application.routes.draw do
|
2015-07-10 00:19:01 -04:00
|
|
|
get 'signup', to: 'users#new', as: :signup
|
|
|
|
get 'signin', to: 'user_sessions#new', as: :signin
|
|
|
|
get 'signout', to: 'user_sessions#destroy', as: :signout
|
|
|
|
|
2015-07-14 16:29:22 -04:00
|
|
|
resources :subcreddits, path: 'c', except: [:destroy] do
|
2015-07-16 11:57:27 -04:00
|
|
|
resources :posts, path: '', constraints: { id: /\d+\-.+/ }, except: [:index] do
|
|
|
|
resources :comments, path: '', constraints: { id: /\d+/ }, except: [:index]
|
|
|
|
end
|
2015-07-14 16:29:22 -04:00
|
|
|
end
|
|
|
|
|
2015-07-10 00:19:01 -04:00
|
|
|
resources :user_sessions, only: [:new, :create, :destroy]
|
2015-08-06 15:10:31 -04:00
|
|
|
resources :users, path: 'u', only: [:show, :new, :create]
|
2015-07-09 16:49:51 -04:00
|
|
|
|
2015-07-13 02:14:35 -04:00
|
|
|
root to: 'subcreddits#index'
|
2015-07-08 10:24:41 -04:00
|
|
|
end
|