Class: NoteDiffFile

Inherits:
ApplicationRecord show all
Includes:
DiffFile
Defined in:
app/models/note_diff_file.rb

Constant Summary

Constants inherited from ApplicationRecord

ApplicationRecord::MAX_PLUCK

Instance Method Summary collapse

Methods included from DiffFile

#to_hash

Methods inherited from ApplicationRecord

cached_column_list, #create_or_load_association, declarative_enum, default_select_columns, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, #readable_by?, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, #to_ability_name, underscore, where_exists, where_not_exists, with_fast_read_statement_timeout, without_order

Methods included from SensitiveSerializableHash

#serializable_hash

Instance Method Details

#raw_diff_fileObject


16
17
18
19
20
21
22
23
# File 'app/models/note_diff_file.rb', line 16

def raw_diff_file
  raw_diff = Gitlab::Git::Diff.new(to_hash)

  Gitlab::Diff::File.new(raw_diff,
                         repository: project.repository,
                         diff_refs: original_position.diff_refs,
                         unique_identifier: id)
end