Skip to content

annotation Athena::Framework::Annotations::Prefix #

Apply a prefix to all actions within self. Can be a static string, but may also contain path arguments.

Fields#

  • prefix : String - The path prefix to use, may also be provided as the first positional argument.

Example#

@[ATHA::Prefix(prefix: "calendar")]
class CalendarController < ATH::Controller
  # The route of this action would be `GET /calendar/events`.
  @[ATHA::Get(path: "events")]
  def events : String
    "events"
  end
end