Skip to content

resolveRailsRoutes

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/libs/parser-core/src/techdocs/cross-file-routes.ts

Prefix a Rails routes file that another routes file draws in.

draw(:api) loads config/routes/api.rb, and the prefix in force at the draw site lives in config/routes.rb. A drawn file normally opens its own namespace, so its local paths are already right and stay untouched — this only fires where the draw is genuinely nested, which is the one case the drawn file cannot know about itself.

Signature

ts
function resolveRailsRoutes(entities: Entity[]): number

Parameters

NameType
entitiesEntity[]

Returns: number

Was this page helpful?

Download as PDF