diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-03-21 17:01:38 -0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-03-21 17:01:38 -0300 |
commit | 100e3e7601dd4d3033cd8292814273dd0354722e (patch) | |
tree | 4071b582ebc05f8b75dc95b26a9248750a292117 /app/models/concerns/issuable.rb | |
parent | 355d3119fdeb29d2d5a9764364e1e864c05f79c1 (diff) | |
download | gitlab-ce-100e3e7601dd4d3033cd8292814273dd0354722e.tar.gz |
Fix sorting issues/mrs by votes on the groups pagefix-sorting-by-votes-on-groups-page
The `non_archived` scope applied here
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/controllers/conc
erns/issues_action.rb#L5 overrides the previous `ORDER BY` applied
inside the IssuesFinder, with the default scope of the Project model,
resulting in SQL errors.
Diffstat (limited to 'app/models/concerns/issuable.rb')
-rw-r--r-- | app/models/concerns/issuable.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/concerns/issuable.rb b/app/models/concerns/issuable.rb index 476e1ce7af0..cf5b2c71675 100644 --- a/app/models/concerns/issuable.rb +++ b/app/models/concerns/issuable.rb @@ -41,7 +41,7 @@ module Issuable scope :join_project, -> { joins(:project) } scope :references_project, -> { references(:project) } - scope :non_archived, -> { join_project.merge(Project.non_archived) } + scope :non_archived, -> { join_project.merge(Project.non_archived.only(:where)) } delegate :name, :email, |