From 27482983496cd0b8b6fa7dc943a1b05959735835 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 13 Oct 2023 12:16:18 -0400 Subject: Nice pagination! --- app/views/blogs/_list.html.haml | 5 +++++ app/views/blogs/summary.html.haml | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 app/views/blogs/_list.html.haml (limited to 'app/views/blogs') diff --git a/app/views/blogs/_list.html.haml b/app/views/blogs/_list.html.haml new file mode 100644 index 0000000..3618bdb --- /dev/null +++ b/app/views/blogs/_list.html.haml @@ -0,0 +1,5 @@ +- if not @main_page + = will_paginate @blogs +- @blogs.each do |blog| + = render blog, short: true += will_paginate @blogs diff --git a/app/views/blogs/summary.html.haml b/app/views/blogs/summary.html.haml index e9639ca..79811b1 100644 --- a/app/views/blogs/summary.html.haml +++ b/app/views/blogs/summary.html.haml @@ -1,3 +1 @@ -- @blogs.each do |blog| - = render blog, short: true -= will_paginate @blogs += render "list" -- cgit 1.4.1