Sha256: 24dfea991fc8369d0b805b2c6ff8bc465fa5effd430c856d9029d36a0463b14f

Contents?: true

Size: 1.39 KB

Versions: 33

Compression:

Stored size: 1.39 KB

Contents

TrustyCms::Application.routes.draw do
  root to: 'site#show_page'
  TrustyCms::Application.config.enabled_extensions.each { |ext|
    load File.join(TrustyCms::ExtensionPath.find(ext).to_s, "config", "routes.rb")
  }
  namespace :admin do
    resources :pages do
      resources :children, :controller => 'pages'
      #TODO: put back the remove on children possibly
      get 'remove', on: :member
    end
    resources :layouts do
      get 'remove', on: :member
    end
    resources :users do
      get 'remove', on: :member
    end
  end

  match 'admin/preview' => 'admin/pages#preview', :as => :preview, :via => [:post, :put]
  namespace :admin do
    resource :preferences
    resource :configuration, :controller => 'configuration'
    resources :extensions, :only => :index
    resources :page_parts
    resources :page_fields
    match '/reference/:type(.:format)' => 'references#show', :as => :reference, :via => :get
  end

  match 'admin' => 'admin/welcome#index', :as => :admin
  match 'admin/welcome' => 'admin/welcome#index', :as => :welcome
  match 'admin/login' => 'admin/welcome#login', :as => :login
  match 'admin/logout' => 'admin/welcome#logout', :as => :logout
  # match '/' => 'site#show_page', :url => '/' # set root to this so root_path works
  match 'error/404' => 'site#not_found', :as => :not_found
  match 'error/500' => 'site#error', :as => :error
  match '*url' => 'site#show_page'
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
trusty-cms-1.2.29 config/routes.rb
trusty-cms-1.2.28 config/routes.rb
trusty-cms-1.1.28 config/routes.rb
trusty-cms-1.1.27 config/routes.rb
trusty-cms-1.1.26 config/routes.rb
trusty-cms-1.1.25 config/routes.rb
trusty-cms-1.1.24 config/routes.rb
trusty-cms-1.1.23 config/routes.rb
trusty-cms-1.1.22 config/routes.rb
trusty-cms-1.1.21 config/routes.rb
trusty-cms-1.1.20 config/routes.rb
trusty-cms-1.1.19 config/routes.rb
trusty-cms-1.1.18 config/routes.rb
trusty-cms-1.1.17 config/routes.rb
trusty-cms-1.1.16 config/routes.rb
trusty-cms-1.1.15 config/routes.rb
trusty-cms-1.1.14 config/routes.rb
trusty-cms-1.1.13 config/routes.rb
trusty-cms-1.1.12 config/routes.rb
trusty-cms-1.1.11 config/routes.rb