Created
February 24, 2023 20:18
-
-
Save bradpauly/e9916e246acfefea2bd5b4f55e6e73cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Controller | |
recipes = Recipe.all | |
@pager = Pager.new(results: recipes, rows_per_page: 10, page: 1) | |
# ERB template | |
<% @pager.rows.each do |row| %> | |
<%= row.name %> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment