amberframework / amber

A Crystal web framework that makes building applications fast, simple, and enjoyable. Get started with quick prototyping, less bugs, and blazing fast performance.
https://amberframework.org
MIT License
2.57k stars 205 forks source link

1227 fix layout equals false #1307

Closed drujensen closed 1 year ago

drujensen commented 1 year ago

Description of the Change

This PR fixes issue #1227 . This adds a check to see if LAYOUT is false or "false" and disables the layout for all of the render calls in the controller.

Alternate Designs

Passing layout=false to all render calls in the controller

Benefits

Reduces the code needed to disable the layout.

Possible Drawbacks

It's not clear that LAYOUT can be set to false. Its a bit awkward to have a (String | Boolean) union type for this field.