Sha256: c9ad1ff2c29c9bfa4b270bee085502607ada1b55451d944b161c22fec520ded0

Contents?: true

Size: 626 Bytes

Versions: 3

Compression:

Stored size: 626 Bytes

Contents

Enjoy::Faq::Engine.routes.draw do
  routes_config = Enjoy::Faq.configuration.routes_config

  if !routes_config or routes_config[:use_questions_path]
    resources :questions, only: [:show, :new, :create] do
      get '(/page/:page)', action: :index, on: :collection, as: ""
    end
  end

  if !routes_config or routes_config[:use_question_categories_path]
    resources :question_categories, only: [:index, :show] do
      get 'items(/page/:page)', action: :questions, on: :member, as: :items
    end
  end
  if !routes_config or routes_config[:use_faq_path]
    get 'faq' => 'question_categories#index', as: :faq
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
enjoy_cms_faq-0.3.2 config/routes.rb
enjoy_cms_faq-0.3.1 config/routes.rb
enjoy_cms_faq-0.3.0.2 config/routes.rb