Merge pull request #3248 from evazion/feat-tag-relation-search

Fix #2633: Search for status:active at tag_aliases and tag_implications
This commit is contained in:
Albert Yi
2017-07-31 12:53:55 -07:00
committed by GitHub
8 changed files with 135 additions and 183 deletions

View File

@@ -22,8 +22,7 @@ class TagAliasesController < ApplicationController
end
def index
@search = TagAlias.search(params[:search])
@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])
@tag_aliases = TagAlias.search(params[:search]).paginate(params[:page], :limit => params[:limit])
respond_with(@tag_aliases) do |format|
format.xml do
render :xml => @tag_aliases.to_xml(:root => "tag-aliases")

View File

@@ -22,8 +22,7 @@ class TagImplicationsController < ApplicationController
end
def index
@search = TagImplication.search(params[:search])
@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])
@tag_implications = TagImplication.search(params[:search]).paginate(params[:page], :limit => params[:limit])
respond_with(@tag_implications) do |format|
format.xml do
render :xml => @tag_implications.to_xml(:root => "tag-implications")