From e11dedec034c4180985adf4a9f176b07121f0a41 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Wed, 4 Jul 2018 11:46:13 -0400 Subject: Blog drafts no longer require slugs They do still technically require titles, but the engine will fill in "Untitled draft" if it is left blank. Unpublished posts can be viewed at a different URL than published posts would be. Quick links to view published and unpublished posts have been added to the admin panel. refs #1 --- app/controllers/blogs_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/blogs_controller.rb') diff --git a/app/controllers/blogs_controller.rb b/app/controllers/blogs_controller.rb index f31287b..8ee472e 100644 --- a/app/controllers/blogs_controller.rb +++ b/app/controllers/blogs_controller.rb @@ -4,7 +4,7 @@ class BlogsController < ApplicationController @blog = Blog.find_by_slug(params[:slug]) raise ActiveRecord::RecordNotFound unless @blog - raise ActiveRecord::RecordNotFound unless @blog.published or user_signed_in? + raise ActiveRecord::RecordNotFound unless @blog.published end end -- cgit 1.4.1