Project

General

Profile

« Previous | Next » 

Revision 93c01a68

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)

(cherry picked from commit 145db8634df9fbc3ffb51b80093809c5aecd0f6e)

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