Module: Editable

Extended by:
ActiveSupport::Concern
Included in:
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
# File 'app/models/concerns/editable.rb', line 10

def last_edited_by
  super || User.ghost
end