debian-mirror-gitlab/app/models/concerns/editable.rb

14 lines
216 B
Ruby
Raw Normal View History

2018-11-20 20:47:30 +05:30
# frozen_string_literal: true
2017-08-17 22:00:37 +05:30
module Editable
extend ActiveSupport::Concern
2018-03-17 18:26:18 +05:30
def edited?
2017-08-17 22:00:37 +05:30
last_edited_at.present? && last_edited_at != created_at
end
2017-09-10 17:25:29 +05:30
def last_edited_by
super || User.ghost
end
2017-08-17 22:00:37 +05:30
end