<FromGitter>
<drujensen> I guess you could write a pipe that calls render on the return from the controller. It would need to be pretty smart. It would need to determine if render was already called and it not, it would then try to determine which template to render. The other complexity is passing local variables to it.
_whitelogger has joined #amber
<FromGitter>
<andrewc910> Yeah that's why I was thinking of seeing how rails made theirs 'smart'.
<FromGitter>
<andrewc910> Is there any place I can read indepth documentation on the pipping system or is source code best? Where would you recommend I begin?
<FromGitter>
<drujensen> @andrewc910 if you are familiar with Rack in Ruby, a Pipe is similar in Crystal. It includes the HTTP::Handler and you can do anything with the context before or after the next call. It’s a linked list of actions that take place against the request/response. It’s also built into the standard Crystal library so fairly well documented. https://crystal-lang.org/api/0.32.1/HTTP/Handler.html