summaryrefslogtreecommitdiff
path: root/config/routes.rb
blob: 4db3f309413005d96a375e9c3a5d9791a64a820a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Redstoner::Application.routes.draw do

  resources :blogposts, path: '/blog' do
    resources :comments
  end

  resources :statics, only: [:home, :donate, :online], path: '/' do
    collection do
      get 'donate'
      get 'home'
      get 'online'
      get 'index'
    end
  end

  resources :info

  resources :users do
    member do
      get 'confirm'
      get 'edit_login'
      post 'resend_mail'
      get 'edit_notifications'
      put 'update_login'
    end
    collection do
      get  'lost_password'
      post 'reset_password'
      post 'suggestions'
      post 'search_redirect'
    end
  end

  resources :forumgroups,  path: '/forums/groups'
  resources :forumthreads, path: '/forums/threads' do
    resources :threadreplies, path: 'replies'
    collection do
      get 'search'
      post 'search_redirect'
    end
  end
  resources :forums,       path: '/forums'

  resources :tools do
    collection do
      post 'render_markdown'
    end
  end

  # get '/status' => 'status#show'

  get  'login'  => 'sessions#new'
  post 'login'  => 'sessions#create'
  get  'become' => 'sessions#become'
  get  'revert' => 'sessions#revert'
  delete  'logout' => 'sessions#destroy'
  get  'signup' => 'users#new'
  get  '/dmca'  => redirect('https://www.youtube.com/watch?v=oHg5SJYRHA0')

  root to: 'statics#index'
end