diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-03-31 04:33:45 +0300 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-05 19:44:14 +0300 |
commit | bb8cc946689bfafb1e3a65aa00b8e75fb8a5006b (patch) | |
tree | c63719f281b3e38c149ce8a7425d826850914f80 /app/helpers/notes_helper.rb | |
parent | 2058e71e63c9ac471137f831b4d04b6626968532 (diff) |
Don't use original_discussion_id
Diffstat (limited to 'app/helpers/notes_helper.rb')
-rw-r--r-- | app/helpers/notes_helper.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb index e2fa9905e86..61805021b39 100644 --- a/app/helpers/notes_helper.rb +++ b/app/helpers/notes_helper.rb @@ -53,23 +53,19 @@ module NotesHelper } if use_legacy_diff_note - new_note = LegacyDiffNote.new(@new_diff_note_attrs.merge(line_code: line_code)) + data[:note_type] = LegacyDiffNote.name else - new_note = DiffNote.new(@new_diff_note_attrs.merge(position: position)) - + data[:note_type] = DiffNote.name data[:position] = position.to_json end - data.merge( - note_type: new_note.type, - discussion_id: new_note.discussion_class.discussion_id(new_note) - ) + data end def link_to_reply_discussion(discussion, line_type = nil) return unless current_user - data = { discussion_id: discussion.id, original_discussion_id: discussion.original_id, line_type: line_type } + data = { discussion_id: discussion.id, line_type: line_type } data[:line_code] = discussion.line_code if discussion.respond_to?(:line_code) button_tag 'Reply...', class: 'btn btn-text-field js-discussion-reply-button', |