I am trying to build a Sinatra app with HAML and use a layout to be able to break my site down into partials:
layout.haml
!!!
%html
%head
= partial :head
%body
= partial :header
= partial :#{@template}
= partial :footer
Where my Sinatra app is calling layout.haml
like so:
get '/test' do
@template = "\"test/index\""
haml :"layout"
end
To try to pull in:
views/
|----test/
|----_index.haml
Which gives me the error:
wrong number of arguments (0 for 1..2)
I have also tried redefining a number of different combinations with no success:
@template = ":\"test/index\""
= partial #{@template}
@template = "test/index"
= partial :#{@template}
Note: I am using Sinatra Partials
Am I going about this entirely the wrong way? My brain is really suffering trying to figure out how to employ HAML for such a basic concept of DRY templating.