Sha256: 39b72e0151c16555d80f3d741cbcf1352cf56b902657dcb0566505c66026b7a3

Contents?: true

Size: 584 Bytes

Versions: 2

Compression:

Stored size: 584 Bytes

Contents

Ecm::Blog::Engine.routes.draw do
  localized do
    scope :ecm_blog_engine do
      resources :posts, only: [:index, :show] do
        get 'page/:page', action: :index, on: :collection
        get ':year/:month/:day', action: :index, on: :collection, constraints: { year: /\d+/, month: /\d+/, day: /\d+/ }, as: :day
        get ':year/:month', action: :index, on: :collection, constraints: { year: /\d+/, month: /\d+/ }, as: :month
        get ':year', action: :index, on: :collection, constraints: { year: /\d+/ }, as: :year
      end

      root to: 'posts#index'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ecm_blog-1.3.1 config/routes.rb
ecm_blog-1.3.0 config/routes.rb