title: rails render partial after ajax get request
body: <p>I use Jvectormap into my Rails 3 app.
  When I click on it, I want to hide the map and visualize a partial with information about the selected country.</p>
  <p>I handle the map click and I send a GET req to the server.</p>
  <p>users.js.coffee.erb</p>
  <pre><code>$ -&gt;
    $(&quot;#world-map&quot;).vectorMap
      onRegionClick: (event, code) -&gt;
        $('#world-map').hide(1000)
        $.get('/users/statistics', {code: code});
        $('#statistics').show(1000)
  </code></pre>
  <p>users_controller.rb</p>
  <pre><code>def statistics
   @country = Country.find_by_two_letter_code((params[:code]).downcase)  
   render :nothing =&gt; true
  </code></pre>
  <p>end</p>
  <p>this is the response</p>
  <blockquote>
  <p>Started GET &quot;/users/statistics?code=ET&quot; for 127.0.0.1 at 2013-06-02 17:54:49 +0200</p>
  <p>Processing by UsersController#statistics as <em>/</em></p>
  <p>Parameters: {&quot;code&quot;=&gt;&quot;ET&quot;}</p>
  <p>Country Load (0.2ms)  SELECT &quot;countries&quot;.* FROM &quot;countries&quot; WHERE</p>
  <p>&quot;countries&quot;.&quot;two_letter_code&quot; = 'et' LIMIT 1</p>
  <p>Rendered text template (0.0ms)</p>
  <p>Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.2ms)</p>
  </blockquote>
  <p>and the view</p>
  <p>show.html.erb</p>
  <pre><code> &lt;p&gt; &lt;div id=&quot;world-map&quot; style=&quot;width: 620px; height: 300px&quot;&gt;&lt;/div&gt;
        &lt;div id=&quot;statistics&quot; style=&quot;width: 620px; height: 300px; display:none;&quot;&gt;
         &lt;section&gt;
          &lt;%= render partial:'statistics', :locals =&gt; {:country =&gt; @country}  %&gt;
        &lt;/section&gt;
        &lt;/div&gt;
      &lt;/p&gt;
  </code></pre>
  <p>_statistics.html.erb</p>
  <pre><code>&lt;%= link_to '&lt;i class=&quot;icon-remove&quot;&gt;&lt;/i&gt;'.html_safe%&gt;
  &lt;%=country%&gt;
  &lt;%=@country%&gt;
  </code></pre>
  <p>Now, everything works, but the partial doesn't visualize the country value.
  I don't undestand if I have to re-render the partial after the ajax get request, and how.</p>
  <p>I've tried to change the controller in another way, but the behavior is the same.</p>
  <pre><code>def statistics
   @country = Country.find_by_two_letter_code((params[:code]).downcase)  
   render 'users/_statistics'
  end
  </code></pre>