![Oswaldo Ferreira](/assets/img/avatar_default.png)
We request Gitaly in a N+1 manner to build discussion diffs. Once the diffs are from different revisions, it's hard to make a single request to the service in order to build the whole response. With this change we solve this problem and simplify a lot fetching this piece of info.
7 lines
157 B
Ruby
7 lines
157 B
Ruby
class NoteDiffFile < ActiveRecord::Base
|
|
include DiffFile
|
|
|
|
belongs_to :diff_note, inverse_of: :note_diff_file
|
|
|
|
validates :diff_note, presence: true
|
|
end
|