Class: Namespaces::GroupUrlConstraint
- Inherits:
-
Object
- Object
- Namespaces::GroupUrlConstraint
- Defined in:
- app/constraints/namespaces/group_url_constraint.rb
Instance Method Summary collapse
Instance Method Details
#matches?(request) ⇒ Boolean
5 6 7 8 9 10 11 |
# File 'app/constraints/namespaces/group_url_constraint.rb', line 5 def matches?(request) full_path = request.params[:group_id] || request.params[:id] return false unless NamespacePathValidator.valid_path?(full_path) Group.find_by_full_path(full_path, follow_redirects: request.get?).present? end |