Hi Steve,
It's best to imagine the layout option as the first argument to #render, as that's essentially how it's implemented. Whatever is set as the layout, ends up being used as the first argument to a sub-sequent render call. So...
render 'Some text', layout: :main
...eventually ends up calling render again as...
The other thing to remember is that symbol's are treated semantically different to strings. A symbol is assumed to be a file path, while a string is assumed to be a literal template.
Looking at your example, you could do one of the following to make it work. Either set the default directory to your view root, e.g.
render_defaults[:dir] = 'views'
# ...
render :'posts/index', layout: :'layouts/layout'
Or simply go up a directory when setting the layout...
render :index, layout: :'../layouts/layout'
Scorched doesn't (currently) provide a means to set a different default directory for layouts. The need for such a feature is somewhat negated by the fact that you'd typically set the default layout for each controller, as typically, mosts views rendered in a particular controller will use the same layout...
render_defaults.merge!(dir: 'views/posts', layout: :'../layouts/layout', engine: 'slim')
render :index
If you think you've got a good use case for adding the option for a default layout directory, then perhaps this is something you'd like to raise as a feature request in the Github Issue Tracker.
I hope that helps.
Cheers,
Tom