In Sinatra, the following code
haml :index
Will render the file index.html.haml or index.haml
How can I specify file format? I been reading Sinatra README and trying different combinations but I can’t see how to do it.
I need to be able to specify a haml template by giving its format too so I can do something like index.js.haml.
As @Kashyap points out
That would do the trick.