diff options
author | Patrick Derichs <pderichs@gitlab.com> | 2019-07-30 20:25:49 +0200 |
---|---|---|
committer | Patrick Derichs <pderichs@gitlab.com> | 2019-08-01 10:42:42 +0200 |
commit | 0e99daae4afdb90d74c4b0bfe5cb3e482bbb422e (patch) | |
tree | f6170c10e6e6e657425c3d484eabd04d57c87bb0 /app/controllers/snippets/notes_controller.rb | |
parent | 533237a097281dbe4fb1c821d5823c4de8c8f6af (diff) | |
download | gitlab-ce-0e99daae4afdb90d74c4b0bfe5cb3e482bbb422e.tar.gz |
Use NotesFinder in IssuableActions module
Remove project from NotesFinder constructor
Add project parameter to specs
Also look for methods in private scope
Fix specs to match new NotesFinder constructor
Diffstat (limited to 'app/controllers/snippets/notes_controller.rb')
-rw-r--r-- | app/controllers/snippets/notes_controller.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/snippets/notes_controller.rb b/app/controllers/snippets/notes_controller.rb index 612897f27e6..1f016493c1f 100644 --- a/app/controllers/snippets/notes_controller.rb +++ b/app/controllers/snippets/notes_controller.rb @@ -27,7 +27,9 @@ class Snippets::NotesController < ApplicationController alias_method :noteable, :snippet def finder_params - params.merge(last_fetched_at: last_fetched_at, target_id: snippet.id, target_type: 'personal_snippet') + params.merge(last_fetched_at: last_fetched_at, target_id: snippet.id, target_type: 'personal_snippet').tap do |hash| + hash[:project] = project if respond_to?(:project) + end end def authorize_read_snippet! |