From 05da47cac8c41d94c18e699f88c420a105cc5d12 Mon Sep 17 00:00:00 2001 From: r888888888 Date: Tue, 21 Jul 2015 13:47:21 -0700 Subject: [PATCH] fixes #2443: Put aliases/implications with errors at the top --- app/controllers/tag_aliases_controller.rb | 2 +- app/controllers/tag_implications_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/tag_aliases_controller.rb b/app/controllers/tag_aliases_controller.rb index aff4fbfa6..dafa8a0d3 100644 --- a/app/controllers/tag_aliases_controller.rb +++ b/app/controllers/tag_aliases_controller.rb @@ -23,7 +23,7 @@ class TagAliasesController < ApplicationController def index @search = TagAlias.search(params[:search]) - @tag_aliases = @search.order("(case status when 'pending' then 0 when 'queued' then 1 else 2 end), antecedent_name, consequent_name").paginate(params[:page], :limit => params[:limit]) + @tag_aliases = @search.order("(case status when 'pending' then 1 when 'queued' then 2 when 'active' then 3 else 0 end), antecedent_name, consequent_name").paginate(params[:page], :limit => params[:limit]) respond_with(@tag_aliases) do |format| format.xml do render :xml => @tag_aliases.to_xml(:root => "tag-aliases") diff --git a/app/controllers/tag_implications_controller.rb b/app/controllers/tag_implications_controller.rb index 167d4aef2..5518e1b75 100644 --- a/app/controllers/tag_implications_controller.rb +++ b/app/controllers/tag_implications_controller.rb @@ -23,7 +23,7 @@ class TagImplicationsController < ApplicationController def index @search = TagImplication.search(params[:search]) - @tag_implications = @search.order("(case status when 'pending' then 0 when 'queued' then 1 else 2 end), antecedent_name, consequent_name").paginate(params[:page], :limit => params[:limit]) + @tag_implications = @search.order("(case status when 'pending' then 1 when 'queued' then 2 when 'active' then 3 else 0 end), antecedent_name, consequent_name").paginate(params[:page], :limit => params[:limit]) respond_with(@tag_implications) do |format| format.xml do render :xml => @tag_implications.to_xml(:root => "tag-implications")