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
Post a Comment