CodeQL library for Ruby
codeql/ruby-all 0.8.15-dev (changelog, source)
Search

Module Routing

Models routing configuration specified using the ActionDispatch library, which is part of Rails.

Import path

import codeql.ruby.frameworks.actiondispatch.internal.Routing

Predicates

underscore

Convert a camel-case string to underscore case. Converts :: to /. This can be used to convert ActiveRecord controller names to a canonical form that matches the routes they handle. Note: All-uppercase words like CONSTANT are not handled correctly.

Classes

Route

A route configuration. This defines a combination of HTTP method and URL path which should be routed to a particular controller-action pair. This can arise from an explicit call to a routing method, for example: rb get "/photos", to: "photos#index" or via a convenience method like resources, which defines multiple routes at once: rb resources :photos