Sha256: 20be19280db0a612e88a7ec7e3679869a42f74f9a2f365f094604f4e48469166
Contents?: true
Size: 782 Bytes
Versions: 35
Compression:
Stored size: 782 Bytes
Contents
module Scrivito module PresetRoutes def self.install_into(route_set) return if Scrivito::Configuration.scrivito_route_enabled? Scrivito::Configuration.with_scrivito_route_enabled do route_set.draw do scrivito_route '/', using: "homepage", via: :all if Scrivito::Configuration.legacy_routing scrivito_route ':id(/*slug)', using: "slug_id", via: :all else scrivito_route '(/)(*slug-):id', using: "slug_id", via: :all match ':id(/*slug)', to: 'scrivito/legacy_redirect#index', via: :all, constraints: { id: /[a-f0-9]{16}/ } end scrivito_route '/*permalink', using: "permalink", format: false, via: :all end end end end end
Version data entries
35 entries across 35 versions & 1 rubygems