Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pagination works #99

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open

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