How can I pass a variable from one view to a partial view in Sinatra?
I already tried this:
view1.erb
<%= erb_partial :view2, locals: {test: "hello"} %>
view2.erb
<%= puts params[:test] %>
and also I tried:
view1.erb
<%= erb_partial :view2, test: "hello" %>
There are info. but for rails and for sinatra for sending one variable from controller to view, like this, but It did not help me unfortunately.
Any idea?