From 9681897e9ace534c4559fa9be20aa86af1a42e13 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 7 Dec 2024 10:33:07 -0500 Subject: Add daily upvote email like AO3 kudos --- app/models/quote.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/models') diff --git a/app/models/quote.rb b/app/models/quote.rb index 518d53b..3301667 100644 --- a/app/models/quote.rb +++ b/app/models/quote.rb @@ -17,6 +17,10 @@ class Quote < ApplicationRecord scope :published, -> { where(state: :published) } scope :pending, -> { where(state: :pending) } + def title + "Quote \##{id}" + end + def published_date created_at.strftime("%B %d %Y at %I:%M:%S") + created_at.strftime(" %p").downcase + created_at.strftime(" %Z") end -- cgit 1.4.1