struct

CRails::Routes::Route

Inherits Struct < Value < Object

Constructors

new(verb : String, pattern : String, to : String, name : String | Nil = nil, defaults : Hash(String, String) = Hash(String, String).new, source : String | Nil = nil)
Source

Instance methods

action
controller
defaults

scope defaults: { ... } / resources defaults: { ... } — params filled in when the path doesn't set them (segment params win).

name
pattern
Source
segments
source

"file:line" of the DSL call that drew the route (config/routes.rb) — the "Source Location" column the Rails dev Routing Error page shows. Filled from FILE/LINE defaults resolved at the call site, nil for routes emitted without them.

verb