How to make a layout template in Sinatra? -


i'm new sinatra , can't figure out put application layout.

i've seen inline method uses

# app code     __end__  @@layout   %html     = yield 

but i'd layout in it's own .haml file.

what should layout file named? directory should placed in?

if haven't already, create folder sinatra script lives called...

views/ 

and put layout in there, call layout

layout.haml 

or whatever extension (e.g. .erubis) you'd use.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -