Class: PermalinkConstraint

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

Instance Method Summary collapse

Instance Method Details

#matches?(request) ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/permalink_constraint.rb', line 4

def matches?(request)
  Permalink.where(url: Permalink.normalize_url(request.fullpath)).exists?
end