title: Rails 4: Loading posts w/ JQuery & AJAX on a "Load More" button
body: <p>I have a collection of Ideas (you can think of them as posts), and I want to display 6 on my index page initially, then have 6 more load whenever the user hits the "Load more" button. Here's my code:</p>
  
  <p><code>ideas_controller.rb</code>: (Index action)</p>
  
  <pre><code># Get ideas that were created most recently
  @ideas = Idea.page(params[:page]).per(6).order('created_at DESC')
  </code></pre>
  
  <p>Ideas index view:</p>
  
  <pre><code>.ordered-ideas
    = render @ideas
  = link_to_next_page @ideas, 'Load More', :remote =&gt; true, :id =&gt;"load_more_link"
  </code></pre>
  
  <p><code>_idea.html.haml</code> (Partial):</p>
  
  <pre><code>%ul{ :class =&gt; 'span4' }
    %a{ :href =&gt; idea_path(idea.id), :class =&gt; 'thumbnail', :id =&gt; "idea_#{idea.id}" }
      .idea-concept-index
        = idea.concept
  
      .idea-description-index
        = idea.description
      %hr
  
      .idea-index-icons
        .idea-index-teams
          %i{ :class =&gt; 'fa fa-wrench' }
          = idea.teams.count
          teams
  
        .idea-index-like
          %i{ :class =&gt; 'fa fa-heart pink' }
          = idea.likes.count 
          likes
  </code></pre>
  
  <p><code>index.js.erb</code>:</p>
  
  <pre><code>$('.ordered-ideas').append("&lt;%=j render @ideas %&gt;");
  </code></pre>
  
  <p>However, when I hit "Load more", nothing happens... what do I need to add? Thanks.</p>