diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/models/individual_note_discussion.rb | 4 | ||||
-rw-r--r-- | app/models/out_of_context_discussion.rb | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/app/models/individual_note_discussion.rb b/app/models/individual_note_discussion.rb index c3f21c55240..6be8ca45739 100644 --- a/app/models/individual_note_discussion.rb +++ b/app/models/individual_note_discussion.rb @@ -10,4 +10,8 @@ class IndividualNoteDiscussion < Discussion def individual_note? true end + + def reply_attributes + super.tap { |attrs| attrs.delete(:discussion_id) } + end end diff --git a/app/models/out_of_context_discussion.rb b/app/models/out_of_context_discussion.rb index 85794630f70..4227c40b69a 100644 --- a/app/models/out_of_context_discussion.rb +++ b/app/models/out_of_context_discussion.rb @@ -15,8 +15,12 @@ class OutOfContextDiscussion < Discussion def self.override_discussion_id(note) discussion_id(note) end - + def self.note_class Note end + + def reply_attributes + super.tap { |attrs| attrs.delete(:discussion_id) } + end end |