Class: ActionDispatch::Routing::Mapper

Inherits:
Object
  • Object
show all
Defined in:
lib/activeadmin-blog/routing.rb

Instance Method Summary collapse

Instance Method Details

#mount_blog_at(mount_location) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/activeadmin-blog/routing.rb', line 3

def mount_blog_at(mount_location)
  scope mount_location, :module => "ActiveadminBlog" do
    get '/'               => 'posts#index',     :as => :blog
    get '/search'         => 'posts#search',    :as => :blog_search
    get '/feed'           => 'posts#feed',      :as => :blog_rss_feed
    get '/archive/:y/:m'  => 'posts#archive',   :as => :blog_archive
    get '/tags/:tag'      => 'posts#tag',       :as => :blog_tag
    get '/posts/:slug'    => 'posts#show',      :as => :blog_post
    get '/:slug'          => 'posts#category',  :as => :blog_category    
  end
end