Commit 1f5d5af4 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'fix-milestone-upcoming' into 'master'

Fix Milestone.upcoming

The order wasn't happening because of `default_scope`. Blegh.

See merge request !3364
parents 384a82f1 b651a4fd
......@@ -83,7 +83,7 @@ class Milestone < ActiveRecord::Base
end
def self.upcoming
self.where('due_date > ?', Time.now).order(due_date: :asc).first
self.where('due_date > ?', Time.now).reorder(due_date: :asc).first
end
def to_reference(from_project = nil)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment