In your view:
<%= link_to "Load more", posts_path(@posts, page: @posts.current_page+1), id: "load-more-posts", remote: true %>
In your controller:
respond_to :html, :js, only: [:index]
def index
@posts = Post.recent.page(params[:page]).per(10)
respond_with @posts
end
In your index.js.erb
$("#posts-container").append("<%= j(render(partial: "posts", collection: @posts)) %>");
<% if @posts.last_page? %>
$("#load-more-posts").hide();
<% else %>
# hide loader indicator
$("#load-more-posts").attr("href", "<%= posts_path(@posts, page: (@posts.current_page+1)) %>");
<% end %>