diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-10-19 11:46:22 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-10-19 11:46:22 +0200 |
commit | 8b8fbd4e7f51db32425dd30770c1efcea75c00f7 (patch) | |
tree | 93ba69798a89261389a1d3e9a45c7e3e778bb160 /app | |
parent | aafb36616cbad9b3478964dffc10fca97c2f55bb (diff) | |
download | gitlab-ce-8b8fbd4e7f51db32425dd30770c1efcea75c00f7.tar.gz |
Rename confusing methods
Diffstat (limited to 'app')
-rw-r--r-- | app/finders/issuable_finder.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb index f00bb02d0fb..c407dfc163a 100644 --- a/app/finders/issuable_finder.rb +++ b/app/finders/issuable_finder.rb @@ -93,7 +93,7 @@ class IssuableFinder params[:milestone_title].present? end - def no_milestones? + def filter_by_no_milestone? milestones? && params[:milestone_title] == Milestone::None.title end @@ -114,7 +114,7 @@ class IssuableFinder params[:label_name].present? end - def no_labels? + def filter_by_no_label? labels? && params[:label_name] == Label::None.title end @@ -227,7 +227,7 @@ class IssuableFinder def by_milestone(items) if milestones? - if no_milestones? + if filter_by_no_milestone? items = items.where(milestone_id: [-1, nil]) else items = items.joins(:milestone).where(milestones: { title: params[:milestone_title] }) @@ -243,7 +243,7 @@ class IssuableFinder def by_label(items) if labels? - if no_labels? + if filter_by_no_label? items = items. joins("LEFT OUTER JOIN label_links ON label_links.target_type = '#{klass.name}' AND label_links.target_id = #{klass.table_name}.id"). where(label_links: { id: nil }) |