struct Athena::Routing::Converters::Exists(T, P)
- Athena::Routing::Converters::Exists(T, P)
- Struct
- Value
- Object
Overview
Resolves a path param into type T
.
Defined in:
routing/converters.crConstructors
Class Method Summary
-
.convert(id : String) : T
Resolves an object of
T
with an id of typeP
.
Instance Method Summary
Constructor Detail
Class Method Detail
def self.convert(id : String) : T
#
Resolves an object of T
with an id of type P
.
Raises a NotFoundException
if the find method returns nil.
NOTE Requires T
implements a self.find(val : String) : self
method that returns the corresponding record, or nil.