Sha256: 9d2b2af48202f758f0a09b0519419850cc47c970b8e965bf9f5827cf467b255a
Contents?: true
Size: 744 Bytes
Versions: 8
Compression:
Stored size: 744 Bytes
Contents
Rails.application.routes.draw do 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/feed', :to => 'blogs#feed', :format => [:rss] get ':blog_slug/search', :to => 'blogs#search', :as => :search_blog get ':blog_slug/topics', :to => 'blog_categories#index', :as => 'blog_categories' get ':blog_slug/topics/*id', :to => 'blog_categories#show', :as => 'blog_category' get ':blog_slug/:post_slug', :to => 'posts#show' end resources :blogs resources :posts namespace :admin do resources :blogs do resources :posts end resources :blog_categories end end
Version data entries
8 entries across 8 versions & 1 rubygems