Sha256: c07190df5509e22a5450ce0ef09cc07963c1d6950847bfb605c9d3b54a933e04
Contents?: true
Size: 824 Bytes
Versions: 14
Compression:
Stored size: 824 Bytes
Contents
# frozen_string_literal: true EffectivePages::Engine.routes.draw do namespace :admin do resources :pages, except: [:show] resources :page_sections, only: [:index, :edit, :update] resources :page_banners, except: [:show] resources :menus, only: [:index] resources :carousel_items, except: [:show] end scope module: 'effective' do match '*id', to: 'pages#show', via: :get, as: :page, constraints: lambda { |req| Effective::Page.find_by_slug_or_id(req.path_parameters[:id] || '/').present? } end end # Automatically mount the engine as an append Rails.application.routes.append do unless Rails.application.routes.routes.find { |r| r.name == 'effective_pages' } mount EffectivePages::Engine => '/', as: 'effective_pages' end end #root to: 'effective/pages#show', id: 'home'
Version data entries
14 entries across 14 versions & 1 rubygems