When I try to set a locals variable to a string in a partial
render, it doesn't get assigned properly. If I instead use an
intermediate variable, it works.
View file: <%= render :partial => 'partial', :locals =>
{:who => 'me'} %>
Partial file: <%= @who %>
Result: empty string
Expected result: 'me'
Work-around view file: <% @who => 'me' %><%= render
:partial => 'partial', :locals => {:who => @who} %>
The ActionView::Partials docs don't mention that the targets
have to be variables, but that appears to be the case.
The ActionController::Base docs show an example using a string:
render :partial => "person", :locals => { :name => "david"
}