title: Reload page or div using RJS
body: <p>I have a 'like'-counter in a rails project. Whenever one clicks this 'like'-link I want to add one to the like_counter in the database. The logic works well and the database is updated, but I cannot figure out how to set up the Ajax Request correctly so it refreshes the page or the div when completed.</p>
  
  <p>In my view this looks as follows:</p>
  
  <pre><code>&lt;%= link_to_remote 'like', :url =&gt; {
                             :controller =&gt; 'projects', 
                             :action =&gt; 'like_it', 
                             :id=&gt; @project.id }%&gt;
  </code></pre>
  
  <p>The controller:</p>
  
  <pre><code>def like_it
      @project = Project.find(params[:id])
      @project.update_like
      render :update do |page|
         page.reload
      end
  end
  </code></pre>
  
  <p>the update_like method is in the model and just adds one to the counter and saves the project (this part works).
  As for the page.reload I Firefox throws an RJS-Error: ReferenceError: Reload is not defined. And the page is not reloaded</p>
  
  <p>What do I do wrong? Is there a more distinguished way to just reload the div containing the counter? Any help is much appreciated!</p>