Sha256: d33dd19657613d28d3e96e5c11bfe5f7959592280998c8829396c9a29d88e9fd

Contents?: true

Size: 1.72 KB

Versions: 8

Compression:

Stored size: 1.72 KB

Contents

ActionController::Routing::Routes.draw do |map|

  # Admin RESTful Routes
  map.namespace :admin, :member => { :remove => :get } do |admin|
    admin.resources :pages do |pages|
      pages.resources :children, :controller => "pages"
    end
    admin.resources :layouts
    admin.resources :snippets
    admin.resources :users
  end
  map.preview 'admin/preview', :controller => 'admin/pages', :action => 'preview', :conditions => {:method => [:post, :put]}

  map.namespace :admin do |admin|
    admin.resource :preferences
    admin.resource :configuration, :controller => 'configuration'
    # admin.resources :settings
    admin.resources :extensions, :only => :index
    admin.resources :page_parts
    admin.resources :page_fields
    admin.reference '/reference/:type.:format', :controller => 'references', :action => 'show', :conditions => {:method => :get}
  end

  # Admin Routes
  map.with_options(:controller => 'admin/welcome') do |welcome|
    welcome.admin          'admin',                              :action => 'index'
    welcome.welcome        'admin/welcome',                      :action => 'index'
    welcome.login          'admin/login',                        :action => 'login'
    welcome.logout         'admin/logout',                       :action => 'logout'
  end

  # Site URLs
  map.with_options(:controller => 'site') do |site|
    site.root                                                    :action => 'show_page', :url => '/'
    site.not_found         'error/404',                          :action => 'not_found'
    site.error             'error/500',                          :action => 'error'

    # Everything else
    site.connect           '*url',                               :action => 'show_page'
  end

end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
radiant-1.0.1 config/routes.rb
radiant-1.0.0 config/routes.rb
radiant-1.0.0.rc5 config/routes.rb
radiant-1.0.0.rc4 config/routes.rb
radiant-1.0.0.rc3 config/routes.rb
kajam-1.0.3.rc2 config/routes.rb
radiant-1.0.0.rc2 config/routes.rb
radiant-1.0.0.rc1 config/routes.rb