Class: ActionDispatch::Routing::Mapper

Inherits:
Object
  • Object
show all
Defined in:
lib/merrycms/rails/routes.rb

Instance Method Summary collapse

Instance Method Details

#merrycms_routesObject



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
# File 'lib/merrycms/rails/routes.rb', line 5

def merrycms_routes
  namespace :admin do
    resources :users
    
    resources :pages do
      member do
        get 'publish'
        get 'unpublish'
        get 'archive'
        get 'unarchive'
      end
    end
    
    resources :categories do
      member do
        get 'sort'
      end
      collection do
        get 'sorting'
      end
    end
    
    resources :translations do
      collection do
        get 'dump'
      end
    end
    match 'translations/pending/:language' => 'translations#pending', :as => 'pending_translations'
    match 'translations/all/:language' => 'translations#all', :as => 'all_translations'
    
    resources :images
    resources :documents
    resources :videos
    
    
    root :to => 'pages#index'
  end
end