From e09aa803cf3905c82c29dbaa9101cc4a4639cc5a Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 11 Oct 2023 12:12:25 -0400 Subject: We're on Markdown now --- app/models/blog.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/models') diff --git a/app/models/blog.rb b/app/models/blog.rb index 18f63f1..c12d0dc 100644 --- a/app/models/blog.rb +++ b/app/models/blog.rb @@ -18,6 +18,14 @@ class Blog < ApplicationRecord self end + def has_read_more + body.include?("") + end + + def short_body + body[0..(body.index("")-1)] + end + private def set_draft_title if self.title.blank? and not self.published -- cgit 1.4.1