How to make a layout template in Sinatra?

后端 未结 2 505
[愿得一人]
[愿得一人] 2020-12-15 05:42

I\'m new to Sinatra and I can\'t figure out where to put my application layout.

I\'ve seen the inline method that uses

# app code    
__END__

@@lay         


        
2条回答
  •  爱一瞬间的悲伤
    2020-12-15 06:22

    If you haven't already, create a folder where your sinatra script lives called...

    views/
    

    and put your layout in there, call your layout

    layout.haml
    

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

提交回复
热议问题