soveran/cuba — pull request #28 by kitop (2013-12-05 01:02:38+00:00)
Title: Add support for custom default layouts.

Adds a Cuba.settings[:render][:layout] variable.
This lets you set different layouts for different applications.

```
Cuba.plugin Cuba::Render

class Admins < Cuba
settings[:render][:layout] = "admins_layout"

on default do
# Now this will render the home view inside the admins_layout layout
res.write view("home", content: "hello, world")
end

end
```

This is useful when having a Guests and an Admin app, where you'd like to show different layouts depending on the context without needing to specify it in every `view` call.