Sha256: 8c41d41d8374c7fed88dc722da51a66080fa9128a54ebe37d3c01f71ae3f291e
Contents?: true
Size: 1.19 KB
Versions: 1
Compression:
Stored size: 1.19 KB
Contents
WorldDbAdmin::Engine.routes.draw do match 'about', :to => 'pages#about' ############################### # routes for shortcuts (friendly urls) ## 2 lower case letters - assume shortcut for country match '/:key', :to => 'countries#shortcut', :as => :short_country_worker, :key => /[a-z]{2}/ # 2 lower case letters / 2 lower case letters - assume shortcut for country/region match '/:country_key/:key', :to => 'regions#shortcut', :as => :short_region_worker, :country_key => /[a-z]{2}/, :key => /[a-z]{2}/ match '/tag/:key', :to => 'tags#shortcut', :as => :short_tag_worker, :key => /[a-z][a-z0-9_]*/ match 'territories', :to => 'countries#index_territories', :as => 'territories' resources :continents resources :countries resources :regions resources :tags resources :cities resources :codes resources :langs ############################### # more routes for shortcuts (friendly urls) # 3 and more lower case letters - assume shortcut for city # nb: goes last; do NOT want to catch controller names such as cities,countries,etc. match '/:key', :to => 'cities#shortcut', :as => :short_city_worker, :key => /[a-z]{3,}/ root :to => 'countries#index' end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
worlddb-admin-0.1.0 | config/routes.rb |