debian-mirror-gitlab/app/models/concerns/diff_file.rb
2018-11-08 19:23:39 +05:30

9 lines
195 B
Ruby

module DiffFile
extend ActiveSupport::Concern
def to_hash
keys = Gitlab::Git::Diff::SERIALIZE_KEYS - [:diff]
as_json(only: keys).merge(diff: diff).with_indifferent_access
end
end