I wrote a webform using Sinatra and Haml that will be used to call a Ruby script.
Everything seems fine except for one thing: I need to pass an argument to a Haml view f
You can pass a hash of parameters to the Haml method using the :locals key:
:locals
get '/' do haml :index, :locals => {:some_object => some_object} end
This way the Ruby code in your Haml file can access some_object and render whatever content is in there, call methods etc.
some_object