Project

General

Profile

« Previous | Next » 

Revision 2041a83b

Added by Lukas Zapletal about 10 years ago

fixes #4565 - puppet class free-text search is now significantly faster

(cherry picked from commit 0126385b4469accf2474ab3db0ef43f8d7b63558)

View differences:

app/models/puppetclass.rb
scoped_search :in => :environments, :on => :name, :complete_value => :true, :rename => "environment"
scoped_search :in => :hostgroups, :on => :name, :complete_value => :true, :rename => "hostgroup"
scoped_search :in => :hosts, :on => :name, :complete_value => :true, :rename => "host", :ext_method => :search_by_host, :only_explicit => true
scoped_search :in => :class_params, :on => :key, :complete_value => :true
scoped_search :in => :class_params, :on => :key, :complete_value => :true, :only_explicit => true
scope :not_in_any_environment, includes(:environment_classes).where(:environment_classes => {:environment_id => nil})

Also available in: Unified diff