Sha256: 3eaaeea0d1149dbeb40b341dbbbfd42bb6ef4f2c784ba4ef74eef2b9e059dda0

Contents?: true

Size: 280 Bytes

Versions: 3

Compression:

Stored size: 280 Bytes

Contents

module NoCms::Pages::Routes
  class PageFoundConstraint

    # A filter URL must NOT have a qualification as the first of its path filters
    def self.matches?(request)
      @page = NoCms::Pages::Page.no_drafts.where(path: "/#{request.params[:path]}").exists?
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nocms-pages-1.0.0 lib/nocms/pages/routes/page_found_constraint.rb
nocms-pages-0.1.0 lib/nocms/pages/routes/page_found_constraint.rb
nocms-pages-0.0.1 lib/nocms/pages/routes/page_found_constraint.rb