Sha256: 175cbcbe280710df69f8530093856c9a22c5bb6d4facad35b08244c59b0e083b

Contents?: true

Size: 1.7 KB

Versions: 11

Compression:

Stored size: 1.7 KB

Contents

TrustyCms::Application.routes.draw do
  root to: 'site#show_page'

  get '/rad_social/mail' => 'social_mailer#social_mail_form', as: :rad_social_mail_form
  post '/rad_social/mail' => 'social_mailer#create_social_mail', as: :rad_create_social_mail
  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
    resources :password_resets
    post 'save-table-position' => "pages#save_table_position", as: "save_tables_position"
  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

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

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
trusty-cms-3.1.6 config/routes.rb
trusty-cms-3.1.5 config/routes.rb
trusty-cms-3.1.3 config/routes.rb
trusty-cms-3.1.2 config/routes.rb
trusty-cms-3.0.11 config/routes.rb
trusty-cms-3.1.1 config/routes.rb
trusty-cms-3.0.10 config/routes.rb
trusty-cms-3.1.0 config/routes.rb
trusty-cms-3.0.9 config/routes.rb
trusty-cms-3.0.8 config/routes.rb
trusty-cms-3.0.7 config/routes.rb