GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Fork of halorgium/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/technoweenie/mephisto.git
Click here to lend your support to: mephisto and make a donation at www.pledgie.com !
technoweenie (author)
Mon Aug 21 21:04:29 -0700 2006
commit  93bca3fe1db8673f1defc4ebe6be301ec0b086e2
tree    fdcfa0187b2d67e0043236b6f481518822d357d5
parent  abc8fbb55c54b901b173f4c6894b2353830b7250
mephisto / config / routes.rb
100644 43 lines (31 sloc) 2.007 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
ActionController::Routing::Routes.draw do |map|
  map.feed 'feed/*sections', :controller => 'feed', :action => 'feed'
 
  map.with_options :controller => 'assets', :action => 'show' do |m|
    m.connect ':dir/:path.:ext', :dir => /stylesheets|javascripts|images/
    m.css 'stylesheets/:path.:ext', :dir => 'stylesheets'
    m.js 'javascripts/:path.:ext', :dir => 'javascripts'
    m.images 'images/:path.:ext', :dir => 'images'
  end
  
  map.overview 'admin/overview.xml', :controller => 'admin/overview', :action => 'feed'
  map.admin 'admin', :controller => 'admin/overview', :action => 'index'
  map.resources :assets, :path_prefix => '/admin', :controller => 'admin/assets', :collection => { :latest => :post, :search => :post, :upload => :post }
  
  map.connect ':controller/:action/:id/:version', :version => nil, :controller => /routing_navigator|account|(admin\/\w+)/
  
  map.comment ':year/:month/:day/:permalink/comment', :controller => 'comments', :action => 'create',
      :year => /\d{4}/, :month => /\d{1,2}/, :day => /\d{1,2}/
 
  map.comment_preview ':year/:month/:day/:permalink/comment/:comment', :controller => 'comments', :action => 'show',
      :year => /\d{4}/, :month => /\d{1,2}/, :day => /\d{1,2}/
 
  map.with_options :controller => 'mephisto' do |m|
    m.article ':year/:month/:day/:permalink', :action => 'show',
      :year => /\d{4}/, :month => /\d{1,2}/, :day => /\d{1,2}/
 
    m.monthly ':year/:month', :action => 'month',
      :year => /\d{4}/, :month => /\d{1,2}/
 
    m.paged_monthly ':year/:month/page/:page', :action => 'month',
      :year => /\d{4}/, :month => /\d{1,2}/, :page => /\d+/
 
    m.daily ':year/:month/:day', :action => 'day',
      :year => /\d{4}/, :month => /\d{1,2}/, :day => /\d{1,2}/
  
    m.yearly ':year', :action => 'yearly',
      :year => /\d{4}/
  
    m.search 'search', :action => 'search'
    m.section '*sections', :action => 'list'
  end
end