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 indexIn 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| HTTP status code symbols for Rails | |
| Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
| Status Code Symbol | |
| 1xx Informational | |
| 100 :continue | |
| 101 :switching_protocols | |
| 102 :processing |