Module: Editable

Extended by:
ActiveSupport::Concern
Included in:
AntiAbuse::Reports::Note, Issuable, Note, Snippet
Defined in:
app/models/concerns/editable.rb

Instance Method Summary collapse

Instance Method Details

#edited?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'app/models/concerns/editable.rb', line 6

def edited?
  last_edited_at.present? && last_edited_at != created_at
end

#last_edited_byObject



10
11
12
13
14
# File 'app/models/concerns/editable.rb', line 10

def last_edited_by
  return if last_edited_at.blank?

  super || Users::Internal.ghost
end