creddit/config/routes.rb

17 lines
569 B
Ruby
Raw Normal View History

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]
resources :users, only: [:new, :create]
2015-07-09 16:49:51 -04:00
root to: 'subcreddits#index'
2015-07-08 10:24:41 -04:00
end