Class: NoCms::Pages::Routes::PageFoundConstraint
- Inherits:
-
Object
- Object
- NoCms::Pages::Routes::PageFoundConstraint
- Defined in:
- lib/nocms/pages/routes/page_found_constraint.rb
Class Method Summary collapse
-
.matches?(request) ⇒ Boolean
A filter URL must NOT have a qualification as the first of its path filters.
Class Method Details
.matches?(request) ⇒ Boolean
A filter URL must NOT have a qualification as the first of its path filters
5 6 7 |
# File 'lib/nocms/pages/routes/page_found_constraint.rb', line 5 def self.matches?(request) @page = NoCms::Pages::Page.no_drafts.where(path: "/#{request.params[:path]}").exists? end |