title: Rails form_tag remote example
body: <p>I have this incredible simple form:</p>
  
  <pre><code>&lt;%= form_tag("/portal/search", method: 'get', remote: true ) do %&gt;
  
    &lt;%= label_tag(:query, 'Search for:') %&gt;
    &lt;%= text_field_tag(:query) %&gt;
    &lt;%= submit_tag("Find") %&gt;
  
  &lt;% end %&gt;
  &lt;div id="results"&gt;&lt;/div&gt; 
  </code></pre>
  
  <p>I know from the documentation, I can use AJAX through the remote option:</p>
  
  <pre><code>&lt;%= form_tag("/portal/search", method: 'get', remote: true ) do %&gt;
  </code></pre>
  
  <p>Then I get stuck. I know how to generate results in a view/partial, but how do I get that partial inside the div element? I know a bit of JQuery, so I can select the element. I found a lot of results, but they seem to miss that lightbulb moment for me. I am using Rails <strong>4.1.6</strong></p>
  
  <p>My results are just simple records from a model, like Book (title, author)</p>
  
  <p>Thank you for helping!</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I've won the cup for missing the point by a long shot. I had to add the search.js.erb inside the <strong>view</strong> folder instead of assets. </p>