engine/config/routes.rb

70 lines
1.8 KiB
Ruby
Raw Normal View History

2010-06-03 15:32:40 +00:00
# Locomotive::Application.routes.draw do |map|
Rails.application.routes.draw do
2010-04-13 14:26:40 +00:00
# admin authentication
devise_for :admin, :class_name => 'Account', :controllers => { :sessions => 'admin/sessions', :passwords => 'admin/passwords' }
as :admin do
get '/admin' => 'admin/sessions#new'
end
2010-04-13 14:26:40 +00:00
# admin interface for each website
namespace 'admin' do
root :to => 'sessions#new'
resources :pages do
put :sort, :on => :member
get :get_path, :on => :collection
end
resources :snippets
resources :sites
resource :current_site
resources :accounts
resource :my_account
2010-05-11 21:38:52 +00:00
resources :memberships
resources :theme_assets do
get :all, :action => 'index', :on => :collection, :defaults => { :all => true }
end
2010-05-12 00:16:39 +00:00
resources :asset_collections
resources :assets, :path => 'asset_collections/:collection_id/assets'
2010-09-15 00:19:34 +00:00
resources :images
resources :content_types
resources :contents, :path => 'content_types/:slug/contents' do
put :sort, :on => :collection
end
resources :api_contents, :path => 'api/:slug/contents', :controller => 'api_contents', :only => [:create]
resources :custom_fields, :path => 'custom/:parent/:slug/fields'
resources :cross_domain_sessions, :only => [:new, :create]
resource :import, :only => [:new, :show, :create]
# installation guide
match '/installation' => 'installation#show', :defaults => { :step => 1 }, :as => :installation
match '/installation/:step' => 'installation#show', :as => :installation_step
end
# sitemap
match '/sitemap.xml' => 'admin/sitemaps#show', :format => 'xml'
2010-05-12 00:16:39 +00:00
# magic urls
2010-06-03 15:32:40 +00:00
match '/' => 'admin/rendering#show'
match '*path/edit' => 'admin/rendering#show', :defaults => { :editing => true }
2010-06-03 15:32:40 +00:00
match '*path' => 'admin/rendering#show'
2010-03-29 22:01:47 +00:00
end