summaryrefslogtreecommitdiff
path: root/app/finders
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2016-05-18 13:05:53 -0500
committerFatih Acet <acetfatih@gmail.com>2016-05-18 13:05:53 -0500
commitbb883387f9e4d5564b455cce7d412f730664a2f5 (patch)
tree02f972c30f9a01d605e2c88a22b2c7172694e475 /app/finders
parent7a4e7ad04e1fc96953d9159e8e1a2208990d34f7 (diff)
parentb7d83acf5b03e08dc9e387e1abb83c5e3c80444c (diff)
downloadgitlab-ce-bb883387f9e4d5564b455cce7d412f730664a2f5.tar.gz
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into awardables
# Conflicts: # app/controllers/projects/merge_requests_controller.rb # app/models/note.rb # db/schema.rb # spec/models/note_spec.rb
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/issuable_finder.rb4
-rw-r--r--app/finders/notes_finder.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb
index f00f3f709e9..5849e00662b 100644
--- a/app/finders/issuable_finder.rb
+++ b/app/finders/issuable_finder.rb
@@ -252,8 +252,8 @@ class IssuableFinder
if filter_by_no_milestone?
items = items.where(milestone_id: [-1, nil])
elsif filter_by_upcoming_milestone?
- upcoming = Milestone.where(project_id: projects).upcoming
- items = items.joins(:milestone).where(milestones: { title: upcoming.try(:title) })
+ upcoming_ids = Milestone.upcoming_ids_by_projects(projects)
+ items = items.joins(:milestone).where(milestone_id: upcoming_ids)
else
items = items.joins(:milestone).where(milestones: { title: params[:milestone_title] })
diff --git a/app/finders/notes_finder.rb b/app/finders/notes_finder.rb
index ab252821b52..ee14ac60fb4 100644
--- a/app/finders/notes_finder.rb
+++ b/app/finders/notes_finder.rb
@@ -10,7 +10,7 @@ class NotesFinder
notes =
case target_type
when "commit"
- project.notes.for_commit_id(target_id).not_inline
+ project.notes.for_commit_id(target_id).non_diff_notes
when "issue"
project.issues.find(target_id).notes.inc_author
when "merge_request"