2018-08-03 17:22:24 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-05-18 12:24:34 +00:00
|
|
|
module Editable
|
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
2017-08-24 16:26:24 +00:00
|
|
|
def edited?
|
2017-05-18 12:24:34 +00:00
|
|
|
last_edited_at.present? && last_edited_at != created_at
|
|
|
|
end
|
2017-07-17 14:38:43 +00:00
|
|
|
|
|
|
|
def last_edited_by
|
|
|
|
super || User.ghost
|
|
|
|
end
|
2017-05-18 12:24:34 +00:00
|
|
|
end
|