guoren/config/routes.rb

31 lines
780 B
Ruby
Raw Normal View History

2016-12-22 20:00:08 +08:00
Rails.application.routes.draw do
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
root 'login#init'
get '/login', to: 'login#init'
post '/login', to: 'login#login'
get 'logout', to: 'login#logout'
get '/signup', to: 'users#new'
2016-12-22 20:05:38 +08:00
get '/profile' ,to: 'users#edit'
2016-12-22 20:00:08 +08:00
get '/main', to: 'main#show'
2016-12-22 20:05:38 +08:00
get '/activity',to: 'main#activity'
2016-12-22 20:00:08 +08:00
get '/chat', to: 'chat#index'
post '/newmsg', to: 'chat#new'
get '/notify', to: 'chat#notify'
get '/query', to: 'chat#query'
2016-12-22 20:05:38 +08:00
get '/online', to: 'chat#online'
get '/microposts', to: 'micro_posts#show'
post 'newpost', to: 'micro_posts#new'
get '/comments', to: 'comments#get'
post '/newcomment', to: 'comments#new'
2016-12-22 20:00:08 +08:00
resource :users
2016-12-22 20:05:38 +08:00
resource :micro_posts
2016-12-22 20:00:08 +08:00
end