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
|
# File 'lib/comfortable_mexican_sofa/routing.rb', line 3
def self.admin(options = {})
options[:path] ||= 'cms-admin'
Rails.application.routes.draw do
namespace :cms_admin, :path => options[:path], :except => :show do
get '/', :to => 'base#jump'
resources :sites do
resources :pages do
get :form_blocks, :on => :member
get :toggle_branch, :on => :member
put :reorder, :on => :collection
resources :revisions, :only => [:index, :show, :revert] do
put :revert, :on => :member
end
end
resources :files do
put :reorder, :on => :collection
end
resources :layouts do
put :reorder, :on => :collection
resources :revisions, :only => [:index, :show, :revert] do
put :revert, :on => :member
end
end
resources :snippets do
put :reorder, :on => :collection
resources :revisions, :only => [:index, :show, :revert] do
put :revert, :on => :member
end
end
resources :categories
get 'dialog/:type' => 'dialogs#show', :as => 'dialog'
end
end
end
end
|