How do I pass a variable to a partial template and then output that variable from the template?
This is the file in views that calls the template:
<%= render :partial => 'layouts/foo', :selected => "Word" %>
This is the partial, _foo.html.erb:
<%= :selected %>
Yet it just outputs the word “selected” instead of its value. How do I fix that?
Variables are passed differently into a partial:
and used as: