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:
authorRémy Coutable <remy@rymai.me>2017-09-26 17:18:45 +0300
committerRémy Coutable <remy@rymai.me>2017-09-26 18:41:03 +0300
commita4168719abefe9cfa6c417d73e0833823a92fa08 (patch)
tree341f70e6fb511d1094cb893acdab987306751a24
parent951a5cca6202ed64de0687205d13b2b03346e514 (diff)
Remove `weight` from IssuableFinder::SCALAR_PARAMS and improve the array formatting
Signed-off-by: Rémy Coutable <remy@rymai.me>
-rw-r--r--app/finders/issuable_finder.rb20
1 files changed, 19 insertions, 1 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb
index 673cd36046d..24c07f3dc70 100644
--- a/app/finders/issuable_finder.rb
+++ b/app/finders/issuable_finder.rb
@@ -25,8 +25,26 @@ class IssuableFinder
NONE = '0'.freeze
- SCALAR_PARAMS = %i(scope state group_id project_id milestone_title assignee_id search label_name sort assignee_username author_id author_username authorized_only due_date iids non_archived weight).freeze
+ SCALAR_PARAMS = %i[
+ assignee_id
+ assignee_username
+ author_id
+ author_username
+ authorized_only
+ due_date
+ group_id
+ iids
+ label_name
+ milestone_title
+ non_archived
+ project_id
+ scope
+ search
+ sort
+ state
+ ].freeze
ARRAY_PARAMS = { label_name: [], iids: [], assignee_username: [] }.freeze
+
VALID_PARAMS = (SCALAR_PARAMS + [ARRAY_PARAMS]).freeze
attr_accessor :current_user, :params