about summary refs log tree commit diff stats
path: root/app/models/quote.rb
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-12-07 10:33:07 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2024-12-07 10:33:07 -0500
commit9681897e9ace534c4559fa9be20aa86af1a42e13 (patch)
tree85fbe155f6d1db7f8e232dac40be109fa066f9ed /app/models/quote.rb
parentde217df62df5725450ba7fd0084a00a8ebe24599 (diff)
downloadthoughts-9681897e9ace534c4559fa9be20aa86af1a42e13.tar.gz
thoughts-9681897e9ace534c4559fa9be20aa86af1a42e13.tar.bz2
thoughts-9681897e9ace534c4559fa9be20aa86af1a42e13.zip
Add daily upvote email like AO3 kudos
Diffstat (limited to 'app/models/quote.rb')
-rw-r--r--app/models/quote.rb4
1 files changed, 4 insertions, 0 deletions
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
17 scope :published, -> { where(state: :published) } 17 scope :published, -> { where(state: :published) }
18 scope :pending, -> { where(state: :pending) } 18 scope :pending, -> { where(state: :pending) }
19 19
20 def title
21 "Quote \##{id}"
22 end
23
20 def published_date 24 def published_date
21 created_at.strftime("%B %d %Y at %I:%M:%S") + created_at.strftime(" %p").downcase + created_at.strftime(" %Z") 25 created_at.strftime("%B %d %Y at %I:%M:%S") + created_at.strftime(" %p").downcase + created_at.strftime(" %Z")
22 end 26 end