Class: PagesCore::PagePathConstraint

Inherits:
Object
  • Object
show all
Defined in:
lib/pages_core/page_path_constraint.rb

Instance Method Summary collapse

Instance Method Details

#matches?(request) ⇒ Boolean

Returns:

  • (Boolean)

3
4
5
6
7
8
9
# File 'lib/pages_core/page_path_constraint.rb', line 3

def matches?(request)
  locale?(request.path_parameters[:locale]) &&
    exists?(
      request.path_parameters[:locale],
      request.path_parameters[:path]
    )
end