Sha256: 9097f760f9ae5c3de38abc95772714ba40396684ce564d8ce698c2a84a7e68c9

Contents?: true

Size: 1.24 KB

Versions: 14

Compression:

Stored size: 1.24 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_tagged 'articles/tagged/:tag'
    articles.articles_tagged_format 'articles/tagged/:tag.:format'
    articles.articles_authored 'articles/author/:user_id'
    articles.articles_authored_format 'articles/author/:user_id.:format'
    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}/
  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, :member => { :preview => :put }, :collection => { :preview => :post }
    admin.resources :comments, :only => [:index, :destroy]
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
beef-articles-0.3.0 config/routes.rb
beef-articles-0.3.1 config/routes.rb
beef-articles-0.3.10 config/routes.rb
beef-articles-0.3.11 config/routes.rb
beef-articles-0.3.12 config/routes.rb
beef-articles-0.3.13 config/routes.rb
beef-articles-0.3.2 config/routes.rb
beef-articles-0.3.3 config/routes.rb
beef-articles-0.3.4 config/routes.rb
beef-articles-0.3.5 config/routes.rb
beef-articles-0.3.6 config/routes.rb
beef-articles-0.3.7 config/routes.rb
beef-articles-0.3.8 config/routes.rb
beef-articles-0.3.9 config/routes.rb