From 5f860c66d300654934848aee1abe8e5c0d41836e Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 11 Oct 2023 16:25:37 -0400 Subject: Added blog archive The path to blog posts is now "blog" instead of "says", btw. --- app/controllers/blogs_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/controllers/blogs_controller.rb') diff --git a/app/controllers/blogs_controller.rb b/app/controllers/blogs_controller.rb index eda1bbb..c35a05d 100644 --- a/app/controllers/blogs_controller.rb +++ b/app/controllers/blogs_controller.rb @@ -1,7 +1,11 @@ class BlogsController < ApplicationController - def index + def summary @blogs = Blog.where(published: true).order(published_at: :desc).paginate(page: params[:page], per_page: 10) + end + + def index + @blogs = Blog.where(published: true).order(published_at: :desc) respond_to do |format| format.html -- cgit 1.4.1