diff options
author | gfyoung <gfyoung17@gmail.com> | 2018-09-11 12:08:34 -0700 |
---|---|---|
committer | gfyoung <gfyoung17@gmail.com> | 2018-09-11 12:15:23 -0700 |
commit | 47b3038434f50f216b6a9b9d0ed05ac5ff586625 (patch) | |
tree | 28261964a27bcee8820af1331bc7fe5c2c7438b5 /app/finders/concerns | |
parent | e91dc8f4badfdb4742d1662f34edd85f43fb317f (diff) | |
download | gitlab-ce-47b3038434f50f216b6a9b9d0ed05ac5ff586625.tar.gz |
Enable frozen string in app/graphql + app/finders
Partially addresses #47424.
Diffstat (limited to 'app/finders/concerns')
-rw-r--r-- | app/finders/concerns/created_at_filter.rb | 2 | ||||
-rw-r--r-- | app/finders/concerns/custom_attributes_filter.rb | 2 | ||||
-rw-r--r-- | app/finders/concerns/finder_methods.rb | 2 | ||||
-rw-r--r-- | app/finders/concerns/finder_with_cross_project_access.rb | 2 |
4 files changed, 8 insertions, 0 deletions
diff --git a/app/finders/concerns/created_at_filter.rb b/app/finders/concerns/created_at_filter.rb index ac9ac77732c..6b5863a5c53 100644 --- a/app/finders/concerns/created_at_filter.rb +++ b/app/finders/concerns/created_at_filter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module CreatedAtFilter def by_created_at(items) items = items.created_before(params[:created_before]) if params[:created_before].present? diff --git a/app/finders/concerns/custom_attributes_filter.rb b/app/finders/concerns/custom_attributes_filter.rb index 5bbf9ca242d..80fad941ab1 100644 --- a/app/finders/concerns/custom_attributes_filter.rb +++ b/app/finders/concerns/custom_attributes_filter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module CustomAttributesFilter def by_custom_attributes(items) return items unless params[:custom_attributes].is_a?(Hash) diff --git a/app/finders/concerns/finder_methods.rb b/app/finders/concerns/finder_methods.rb index 2e905fa5750..998ca318133 100644 --- a/app/finders/concerns/finder_methods.rb +++ b/app/finders/concerns/finder_methods.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module FinderMethods def find_by!(*args) raise_not_found_unless_authorized execute.find_by!(*args) diff --git a/app/finders/concerns/finder_with_cross_project_access.rb b/app/finders/concerns/finder_with_cross_project_access.rb index 92bf98d7cd2..220f62bcc7f 100644 --- a/app/finders/concerns/finder_with_cross_project_access.rb +++ b/app/finders/concerns/finder_with_cross_project_access.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Module to prepend into finders to specify wether or not the finder requires # cross project access # |