diff options
author | Régis Freyd (GitLab) <regis@gitlab.com> | 2016-09-06 14:06:16 +0000 |
---|---|---|
committer | Régis Freyd (GitLab) <regis@gitlab.com> | 2016-09-06 14:06:16 +0000 |
commit | b44636c259e7a655a60cc2b98431d6d00a73e002 (patch) | |
tree | 93545ea821319c23410a444f676c8e5a66daeecf /app/models/diff_note.rb | |
parent | 310beb9002f1bbdd07abe5bba6712769773a99b2 (diff) | |
parent | e9e8c67fb7d58288dbac1777b63ea7d3128d6268 (diff) | |
download | gitlab-ce-email-in-slash-commands.tar.gz |
Merge branch 'master' into 'email-in-slash-commands'email-in-slash-commands
# Conflicts:
# doc/user/project/slash_commands.md
# doc/workflow/README.md
Diffstat (limited to 'app/models/diff_note.rb')
-rw-r--r-- | app/models/diff_note.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/app/models/diff_note.rb b/app/models/diff_note.rb index aa54189fea9..4442cefc7e9 100644 --- a/app/models/diff_note.rb +++ b/app/models/diff_note.rb @@ -16,6 +16,9 @@ class DiffNote < Note after_initialize :ensure_original_discussion_id before_validation :set_original_position, :update_position, on: :create before_validation :set_line_code, :set_original_discussion_id + # We need to do this again, because it's already in `Note`, but is affected by + # `update_position` and needs to run after that. + before_validation :set_discussion_id after_save :keep_around_commits class << self @@ -104,10 +107,6 @@ class DiffNote < Note self.noteable.find_diff_discussion(self.discussion_id) end - def to_discussion - Discussion.new([self]) - end - private def supported? |