annotation Athena::Routing::Annotations::Prefix

Overview

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

Fields

Example

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

Defined in:

annotations.cr