fixes #1946
This commit is contained in:
@@ -22,7 +22,7 @@ class PoolElementsController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def all_select
|
def all_select
|
||||||
@pools = Pool.active.order("name").select("id, name").all
|
@pools = Pool.undeleted.where("is_active = true").order("name").select("id, name").all
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class PoolsController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@pools = Pool.active.search(params[:search]).order("updated_at desc").paginate(params[:page], :limit => params[:limit], :search_count => params[:search])
|
@pools = Pool.undeleted.search(params[:search]).order("updated_at desc").paginate(params[:page], :limit => params[:limit], :search_count => params[:search])
|
||||||
respond_with(@pools) do |format|
|
respond_with(@pools) do |format|
|
||||||
format.xml do
|
format.xml do
|
||||||
render :xml => @pools.to_xml(:root => "pools")
|
render :xml => @pools.to_xml(:root => "pools")
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class Pool < ActiveRecord::Base
|
|||||||
attr_accessible :is_deleted, :as => [:janitor, :moderator, :admin]
|
attr_accessible :is_deleted, :as => [:janitor, :moderator, :admin]
|
||||||
|
|
||||||
module SearchMethods
|
module SearchMethods
|
||||||
def active
|
def undeleted
|
||||||
where("is_deleted = false")
|
where("is_deleted = false")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user