Project

General

Profile

« Previous | Next » 

Revision 145db863

Added by Dmitri Dolguikh over 10 years ago

fixes #3826: no more sql errors when trying to search for environments (also domains, operatingsystems, and models)

View differences:

app/controllers/models_controller.rb
def index
@models = Model.search_for(params[:search], :order => params[:order]).paginate(:page => params[:page])
@host_counter = Host.group(:model_id).where(:model_id => @models.pluck(:id)).count
@host_counter = Host.group(:model_id).where(:model_id => @models.select(&:id)).count
end
def new

Also available in: Unified diff