about summary refs log tree commit diff stats
path: root/app/models/quote.rb
diff options
context:
space:
mode:
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