From a4168719abefe9cfa6c417d73e0833823a92fa08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Tue, 26 Sep 2017 16:18:45 +0200 Subject: Remove `weight` from IssuableFinder::SCALAR_PARAMS and improve the array formatting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- app/finders/issuable_finder.rb | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'app/finders') 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 -- cgit v1.2.1