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)


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

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