ash_json_api v0.11.1 AshJsonApi.Resource.Routes.Related View Source

Link to this section Summary

Functions

A GET route to read the related resources of a relationship

Link to this section Functions

Link to this macro

related(relationship, action, opts \\ [])

View Source (macro)

A GET route to read the related resources of a relationship

Examples

related :comments, :default

Arguments

  • :relationship

  • :action - The action to call when this route is hit

Options

  • :route - The path of the route - Defaults to /:id/[relationship_name]

  • :primary? - Whether or not this is the route that should be linked to by default when rendering links to this type of route The default value is false.