2011-10-30 23:02:41 +00:00
|
|
|
Locomotive::Engine.routes.draw do
|
2011-01-11 11:42:12 +00:00
|
|
|
|
2011-11-09 01:35:59 +00:00
|
|
|
# authentication
|
2011-11-04 15:55:51 +00:00
|
|
|
devise_for :locomotive_account,
|
|
|
|
:class_name => 'Locomotive::Account',
|
|
|
|
:path => '',
|
|
|
|
:path_prefix => nil,
|
2011-11-06 11:18:34 +00:00
|
|
|
:failure_app => 'Locomotive::Devise::FailureApp',
|
2011-11-04 15:55:51 +00:00
|
|
|
:controllers => { :sessions => 'locomotive/sessions', :passwords => 'locomotive/passwords' } do
|
2011-11-06 11:18:34 +00:00
|
|
|
match '/' => 'sessions#new'
|
2011-11-03 13:01:08 +00:00
|
|
|
end
|
|
|
|
|
2011-11-04 15:55:51 +00:00
|
|
|
root :to => 'pages#index'
|
2010-07-22 22:10:40 +00:00
|
|
|
|
2011-10-30 23:02:41 +00:00
|
|
|
resources :pages do
|
|
|
|
put :sort, :on => :member
|
|
|
|
get :get_path, :on => :collection
|
|
|
|
end
|
2010-07-22 22:10:40 +00:00
|
|
|
|
2011-10-30 23:02:41 +00:00
|
|
|
resources :snippets
|
2010-07-22 22:10:40 +00:00
|
|
|
|
2011-10-30 23:02:41 +00:00
|
|
|
resources :sites
|
2010-07-22 22:10:40 +00:00
|
|
|
|
2011-10-30 23:02:41 +00:00
|
|
|
resource :current_site, :controller => 'current_site'
|
2010-07-22 22:10:40 +00:00
|
|
|
|
2011-10-30 23:02:41 +00:00
|
|
|
resources :accounts
|
2010-07-22 22:10:40 +00:00
|
|
|
|
2011-10-30 23:02:41 +00:00
|
|
|
resource :my_account, :controller => 'my_account'
|
2010-07-22 22:10:40 +00:00
|
|
|
|
2011-10-30 23:02:41 +00:00
|
|
|
resources :memberships
|
2010-07-22 22:10:40 +00:00
|
|
|
|
2011-10-30 23:02:41 +00:00
|
|
|
resources :theme_assets do
|
|
|
|
get :all, :action => 'index', :on => :collection, :defaults => { :all => true }
|
|
|
|
end
|
2010-07-22 22:10:40 +00:00
|
|
|
|
2011-11-18 23:20:37 +00:00
|
|
|
resources :content_assets
|
2010-07-22 22:10:40 +00:00
|
|
|
|
2011-10-30 23:02:41 +00:00
|
|
|
resources :content_types
|
2010-07-22 22:10:40 +00:00
|
|
|
|
2011-10-30 23:02:41 +00:00
|
|
|
resources :contents, :path => 'content_types/:slug/contents' do
|
|
|
|
put :sort, :on => :collection
|
|
|
|
end
|
2010-07-22 22:10:40 +00:00
|
|
|
|
2011-10-30 23:02:41 +00:00
|
|
|
resources :api_contents, :path => 'api/:slug/contents', :controller => 'api_contents', :only => [:create]
|
2010-07-28 00:42:33 +00:00
|
|
|
|
2011-10-30 23:02:41 +00:00
|
|
|
resources :custom_fields, :path => 'custom/:parent/:slug/fields'
|
2010-09-28 22:08:11 +00:00
|
|
|
|
2011-10-30 23:02:41 +00:00
|
|
|
resources :cross_domain_sessions, :only => [:new, :create]
|
2011-07-04 13:25:02 +00:00
|
|
|
|
2011-10-30 23:02:41 +00:00
|
|
|
resource :import, :only => [:new, :show, :create], :controller => 'import'
|
2010-10-27 00:11:44 +00:00
|
|
|
|
2011-10-30 23:02:41 +00:00
|
|
|
resource :export, :only => [:new], :controller => 'export'
|
2010-10-27 00:11:44 +00:00
|
|
|
|
2011-10-30 23:02:41 +00:00
|
|
|
# installation guide
|
2011-11-06 11:18:34 +00:00
|
|
|
match '/installation' => 'installation#show', :defaults => { :step => 1 }, :as => :installation
|
2011-10-30 23:02:41 +00:00
|
|
|
match '/installation/:step' => 'installation#show', :as => :installation_step
|
|
|
|
end
|
2010-07-22 22:10:40 +00:00
|
|
|
|
2011-10-30 23:02:41 +00:00
|
|
|
Rails.application.routes.draw do
|
2010-07-13 00:46:17 +00:00
|
|
|
# sitemap
|
2011-10-30 23:02:41 +00:00
|
|
|
match '/sitemap.xml' => 'locomotive/sitemaps#show', :format => 'xml'
|
2010-07-22 22:10:40 +00:00
|
|
|
|
2011-07-05 20:34:15 +00:00
|
|
|
# robots.txt
|
2011-10-30 23:02:41 +00:00
|
|
|
match '/robots.txt' => 'locomotive/robots#show', :format => 'txt'
|
2011-07-05 20:34:15 +00:00
|
|
|
|
2010-05-12 00:16:39 +00:00
|
|
|
# magic urls
|
2011-10-30 23:02:41 +00:00
|
|
|
match '/' => 'locomotive/rendering#show'
|
|
|
|
match '*path/edit' => 'locomotive/rendering#edit'
|
|
|
|
match '*path' => 'locomotive/rendering#show'
|
|
|
|
end
|