Class: Bible270::Comment
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Bible270::Comment
- Defined in:
- app/models/bible270/comment.rb
Overview
A publicly visible reflection attached to a plan day (optionally a track).
Instance Method Summary collapse
- #hidden? ⇒ Boolean
-
#hide! ⇒ Object
Every reflection is visible when written; these are the moderation actions.
- #moderated? ⇒ Boolean
- #unhide! ⇒ Object
Instance Method Details
#hidden? ⇒ Boolean
28 |
# File 'app/models/bible270/comment.rb', line 28 def hidden? = !approved |
#hide! ⇒ Object
Every reflection is visible when written; these are the moderation actions.
26 |
# File 'app/models/bible270/comment.rb', line 26 def hide! = update!(approved: false, moderated_at: Time.current) |
#moderated? ⇒ Boolean
29 |
# File 'app/models/bible270/comment.rb', line 29 def moderated? = moderated_at.present? |
#unhide! ⇒ Object
27 |
# File 'app/models/bible270/comment.rb', line 27 def unhide! = update!(approved: true, moderated_at: Time.current) |