forked from gnuine/ubiquo
/
routes.rb
56 lines (50 loc) · 1.39 KB
/
routes.rb
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
# -*- encoding: utf-8 -*-
Ubiquo::Engine.routes.draw do
resources :static_pages do
member do
put :publish
put :unpublish
end
end
resources :pages do
resources :widgets do
collection do
# TODO: review this action
get :change_order
post :change_order
put :change_order
delete :change_order
get :expirations
put :expire_pages
end
member do
post :change_name
put :expire
end
end
resources :blocks
end
match 'pages/:page_id/design',
:to => 'designs#show',
:as => :page_design
match 'pages/:page_id/design/preview',
:to => 'designs#preview',
:as => :preview_page_design
match 'pages/:page_id/design/publish',
:to => 'designs#publish',
:as => :publish_page_design
match 'pages/:page_id/design/unpublish',
:to => 'designs#unpublish',
:as => :unpublish_page_design
end
Rails.application.routes.draw do
# Proposal for public routes.
match '/', :to => 'pages#show', :url => ''
match '/page/:page',
:to => 'pages#show',
:url => '',
:constraints => { :page => /\d*/ }
match '/*url/page/:page', :to => 'pages#show', :constraints => { :page => /\d*/ }
match '/*url/page/:page', :to => 'pages#show', :constraints => { :page => /\d*/ }
match '/*url', :to => 'pages#show'
end