Sha256: b064f0a90448d4f66efb4d1d591390f19ec5e6ee9580466fb13900c4dcda6197

Contents?: true

Size: 278 Bytes

Versions: 4

Compression:

Stored size: 278 Bytes

Contents

module ExceptionallyBeautiful
  class RoutingConstraint
    def matches?(request)
      status = request.env['action_dispatch.request.path_parameters'][:status]
      !status.nil? && status.match(/\d{3}/) && ExceptionallyBeautiful.errors.include?(status.to_i)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
exceptionally_beautiful-0.1.5 lib/exceptionally_beautiful/routing_constraint.rb
exceptionally_beautiful-0.1.4 lib/exceptionally_beautiful/routing_constraint.rb
exceptionally_beautiful-0.1.3 lib/exceptionally_beautiful/routing_constraint.rb
exceptionally_beautiful-0.1.2 lib/exceptionally_beautiful/routing_constraint.rb