gitlab-org--gitlab-foss/app/models/concerns/diff_file.rb
2018-08-07 00:37:36 -07:00

11 lines
226 B
Ruby

# frozen_string_literal: true
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