struct Athena::Routing::Converters::Exists(T, P)

Overview

Resolves a path param into type T.

Defined in:

routing/converters.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new #

[View source]

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.


[View source]

Instance Method Detail

def initialize #

[View source]