Skip to content

Conversation

@BrandiPhillips
Copy link

@CheezItMan I forgot to git add the changes last night. I got the pagination to work. I actually had it working last weekend and just forgot to reset the server I think. :)

Copy link

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work getting the project completed. The only thing I could criticize would be the testing, but you know how to do testing, just didn't have time here.

Way to stick with it.

def index
@search_term = params[:search_term]
@search_results = EdemamApiWrapper.list_recipes(params[:search_term])
@search_results = Kaminari.paginate_array(@search_results).page(params[:page]).per(15)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work getting Kaminari to do the pagination!

<%= next_page_tag unless current_page.last? %>
<%= last_page_tag unless current_page.last? %>
</nav>
<% end -%>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants