Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Derichs <pderichs@gitlab.com>2019-07-30 21:25:49 +0300
committerPatrick Derichs <pderichs@gitlab.com>2019-08-01 11:42:42 +0300
commit0e99daae4afdb90d74c4b0bfe5cb3e482bbb422e (patch)
treef6170c10e6e6e657425c3d484eabd04d57c87bb0 /app/controllers/snippets
parent533237a097281dbe4fb1c821d5823c4de8c8f6af (diff)
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')
-rw-r--r--app/controllers/snippets/notes_controller.rb4
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!