ActionController::Routing::Routes.draw do |map| # The priority is based upon order of creation: first created -> highest priority. # Sample of regular route: # map.connect 'products/:id', :controller => 'catalog', :action => 'view' # Keep in mind you can assign values other than :controller and :action # Sample of named route: # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase' # This route can be invoked with purchase_url(:id => product.id) # You can have the root of your site routed by hooking up '' # -- just remember to delete public/index.html. # map.connect '', :controller => "welcome" # Allow downloading Web Service WSDL as a file with an extension # instead of a file named 'wsdl' map.connect ':controller/service.wsdl', :action => 'wsdl' # legacy url for old avocadia site map.connect 'viewnode/:id', :controller=>'blog', :action=>'viewnode' # map.connect ':year/:month/:day/:title/:action', :controller=>'blog', :requirements=>{:year => /\d{4}/, :month => /\d{1,2}/, :day => /\d{1,2}/} map.node_followup ':year/:month/:day/:title/followup', :controller=>'blog', :requirements=>{:year => /\d{4}/, :month => /\d{1,2}/, :day => /\d{1,2}/}, :action=>'followup' map.connect ':year/:month/:day/:title', :controller=>'blog', :action=>'individual_page', :requirements=>{:year => /\d{4}/, :month => /\d{1,2}/, :day => /\d{1,2}/} map.connect ':year/:month/:day', :controller=>'blog', :action=>'archive_page', :requirements=>{:year => /\d{4}/, :month => /\d{1,2}/, :day => /\d{1,2}/} map.connect ':year/:month', :controller=>'blog', :action=>'archive_page', :requirements=>{:year => /\d{4}/, :month => /\d{1,2}/} map.connect ':year', :controller=>'blog', :action=>'archive_page', :requirements=>{:year => /\d{4}/} map.index '', :controller=>'blog', :action=>'index' # Tag archives map.connect 'tag/:tag', :controller=>'blog', :action=>'tag_archive' # Feeds map.connect 'journal.xml', :controller=>'feed', :action=>'main' map.connect 'feed/:year/:month/:day/:title', :controller=>'feed', :action=>'thread', :requirements=>{:year => /\d{4}/, :month => /\d{1,2}/, :day => /\d{1,2}/} map.connect 'feed', :controller=>'feed', :action=>'main' # Node work map.post '/post', :controller=>'admin/node', :action=>'node' map.edit_node '/node/node/:id', :controller=>'admin/node', :action=>'node' map.edit_node_published '/edit/:year/:month/:day/:title', :controller=>'admin/node', :action=>'edit', :requirements=>{:year => /\d{4}/, :month => /\d{1,2}/, :day => /\d{1,2}/} map.admin_view_author '/admin/author/show/:id', :controller=>'admin/author', :action=>'show' map.admin_view_editor '/admin/editor/show/:id', :controller=>'admin/editor', :action=>'show' map.login '/login', :controller=>"admin/base", :action=>'login' map.logout '/logout', :controller=>"admin/base", :action=>'logout' # %w{author comment base editor publication}.each do |i| # map.connect "/admin/#{i}", :controller => "admin/#{i}", :action => 'index' # map.connect "/admin/#{i}/:action/:id", :controller => "admin/#{i}", :action => nil, :id => nil # end map.connect 'stylesheets/theme/:filename', :controller => 'theme', :action => 'stylesheets', :filename => /.*/ map.connect 'javascripts/theme/:filename', :controller => 'theme', :action => 'javascript', :filename => /.*/ map.connect 'images/theme/:filename', :controller => 'theme', :action => 'images', :filename => /.*/ # Install the default route as the lowest priority. map.connect ':controller/:action/:id' end