Use :locals only when using :partial .
Is this true:
<%= render partial: 'vehicles', locals: { f: f } %>
Or (with Rails 2.3):
<%= render 'vehicles', f: f %>
Your version, which combines both, creates the local name locals and sets its value to a hash containing f: FormBuilder...
It's worth noting that the only reason still using locals: is to use render :collection .
meagar
source share