debian-mirror-gitlab/app/models/merge_request/metrics.rb

12 lines
211 B
Ruby
Raw Normal View History

2016-09-29 09:46:39 +05:30
class MergeRequest::Metrics < ActiveRecord::Base
belongs_to :merge_request
def record!
if merge_request.merged? && self.merged_at.blank?
self.merged_at = Time.now
end
self.save
end
end