Sha256: 6866a7cf9047a8ca2c391915250c96298bd003d9843fdccd404b6c2355ebb0a4
Contents?: true
Size: 361 Bytes
Versions: 1
Compression:
Stored size: 361 Bytes
Contents
module SolidusStaticContent::RouteMatcher EXCLUDED_PATHS = /^\/+(admin|account|cart|checkout|content|login|pg\/|orders|products|s\/|session|signup|shipments|states|t\/|tax_categories|user)+/ def self.matches?(request) path = request.path_info return false if EXCLUDED_PATHS.match? path Spree::Page.visible.where(slug: path).exists? end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
solidus_static_content-2.0.0 | lib/solidus_static_content/route_matcher.rb |