Sha256: 535c84c4b60c7c99bd27598ee8cd8f685de211216b6190d1de66b856028fb5ad

Contents?: true

Size: 1.14 KB

Versions: 20

Compression:

Stored size: 1.14 KB

Contents

ActionController::Routing::Routes.draw do |map|
  map.resources :categories, :has_many => :articles
  
  map.with_options :controller  => 'articles', :action => 'index' do |articles|
    articles.articles_day 'articles/:year/:month/:day',
      :year => /\d{4}/, :month => /\d{1,2}/, :day => /\d{1,2}/
    articles.articles_month 'articles/:year/:month',
      :year => /\d{4}/, :month => /\d{1,2}/
    articles.articles_day 'articles/:year',
      :year => /\d{4}/
    articles.articles_tagged 'articles/tagged/:tag.:format'
    articles.articles_authored 'articles/author/:permalink.:format'
  end
  map.article_permalink 'articles/:year/:month/:day/:permalink',
    :controller => 'articles', :action => 'show',
    :year => /\d{4}/, :day => /\d{1,2}/, :month => /\d{1,2}/,
    :path_prefix => nil
  map.resources :articles, :only => [:index], :collection => { :preview => :get }, :has_many => :comments

  map.namespace(:admin) do |admin|
    admin.resources :categories
    admin.resources :articles, :has_many => :comments, :member => { :preview => :put }, :collection => { :preview => :post }
    admin.resources :comments, :only => [:index, :destroy]
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
beef-articles-0.5.3 config/routes.rb
beef-articles-0.5.2 config/routes.rb
beef-articles-0.5.1 config/routes.rb
beef-articles-0.4.18 config/routes.rb
beef-articles-0.4.17 config/routes.rb
beef-articles-0.4.16 config/routes.rb
beef-articles-0.4.15 config/routes.rb
beef-articles-0.4.14 config/routes.rb
beef-articles-0.4.13 config/routes.rb
beef-articles-0.4.12 config/routes.rb
beef-articles-0.4.11 config/routes.rb
beef-articles-0.4.10 config/routes.rb
beef-articles-0.4.9 config/routes.rb
beef-articles-0.4.8 config/routes.rb
beef-articles-0.4.7 config/routes.rb
beef-articles-0.4.6 config/routes.rb
beef-articles-0.4.5 config/routes.rb
beef-articles-0.4.4 config/routes.rb
beef-articles-0.4.3 config/routes.rb
beef-articles-0.4.2 config/routes.rb