diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-08-17 12:14:44 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-08-17 12:16:46 -0500 |
commit | 4a13aa9f34ab4114bc485e1ca8fa0db8daa0394b (patch) | |
tree | 17554a901009603f52be08914636495b06db2e68 /app/models/discussion.rb | |
parent | f3acf9fd248a16665a114bf6cce761e9277c2d5b (diff) | |
download | gitlab-ce-4a13aa9f34ab4114bc485e1ca8fa0db8daa0394b.tar.gz |
Store discussion_id on Note for faster discussion lookup.
Diffstat (limited to 'app/models/discussion.rb')
-rw-r--r-- | app/models/discussion.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/discussion.rb b/app/models/discussion.rb index b26d2282b00..3fddc084af2 100644 --- a/app/models/discussion.rb +++ b/app/models/discussion.rb @@ -57,7 +57,7 @@ class Discussion def id first_note.discussion_id end - + alias_method :to_param, :id def diff_discussion? @@ -93,7 +93,7 @@ class Discussion return false unless resolvable? current_user == self.noteable.author || - current_user.can?(:push_code, self.project) + current_user.can?(:resolve_note, self.project) end def resolve!(current_user) |