Class: Bible270::Comment

Inherits:
ApplicationRecord show all
Defined in:
app/models/bible270/comment.rb

Overview

A publicly visible reflection attached to a plan day (optionally a track).

Instance Method Summary collapse

Instance Method Details

#hidden?Boolean

Returns:

  • (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

Returns:

  • (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)