title: Render partial error: undefined method `keys' for Array
body: <p>I am allowing the <code>dispenser</code> to approve the <code>dispenser_review</code> using a remote link in rails. The approval in the DB is working, but the updating of the link on the page is not. </p>
  
  <pre><code>Rendered dispenser_reviews/update_approved_review.js.erb (1.6ms)
  Completed 500 Internal Server Error in 22.4ms
  
  NoMethodError - undefined method `keys' for #&lt;Array:0x0000000e632500&gt;:
    actionpack (3.2.17) lib/action_view/renderer/partial_renderer.rb:330:in `find_partial'
  </code></pre>
  
  <p><strong>dispensers/show.html.erb</strong></p>
  
  <pre><code>&lt;% @dispenser_reviews.all.each do |review| %&gt;
    &lt;p id="approval&lt;%= review.id %&gt;"&gt;&lt;%= render :partial =&gt; 'approve_review', locals: { review: review } %&gt;&lt;/p&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p><strong>dispensers/_approve_review</strong></p>
  
  <pre><code>&lt;% if review.approved %&gt;
    &lt;i class="icon-check-sign"&gt;&lt;/i&gt;
  &lt;% else %&gt;
    &lt;%= link_to "Approve", approve_dispenser_review_path(review), :remote=&gt;true %&gt; &lt;%= link_to "Approve with response", "#" %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p><strong>dispenser_reviews_controller.rb</strong></p>
  
  <pre><code>def approve_dispenser_review
    @review = DispenserReview.find(params[:id])
    @review.approved = true
    @review.save
    respond_to do |format|
      format.js { render :action =&gt; "update_approved_review", :layout =&gt; false }
    end
  end
  </code></pre>
  
  <p><strong>dispenser_reviews/update_approved_review.js.erb</strong></p>
  
  <pre><code>$("#approval&lt;%= @review.id %&gt;").html("&lt;%= escape_javascript(render(:partial =&gt; 'dispensers/approve_review', locals: [review: @review] )) %&gt;")
  </code></pre>