Sha256: c70f41917ecba41735a99ef81e895325fc5609016ec12dd605ddac2b306d1124

Contents?: true

Size: 541 Bytes

Versions: 3

Compression:

Stored size: 541 Bytes

Contents

Rails.application.routes.draw do
  resources :blogs
  resources :posts

  namespace :admin do
    resources :blogs do
      resources :posts
    end
  end

  scope :constraints => lambda{ |r| Blog.where(:slug => r.path.split('/')[1]).first } do
    get ':blog_slug', :to => 'blogs#show'
    get ':blog_slug/archive', :to => 'blogs#archive'
    get ':blog_slug/search', :to => 'blogs#search', :as => :search_blog
    get ':blog_slug/feed', :to => 'blogs#feed', :format => [:rss]
    get ':blog_slug/:post_slug', :to => 'posts#show'
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
blog_logic-1.0.0 config/routes.rb
blog_logic-0.7.7 config/routes.rb
blog_logic-0.7.6 config/routes.rb