Skip to content

Instantly share code, notes, and snippets.

Created March 11, 2014 20:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/9494008 to your computer and use it in GitHub Desktop.
Save anonymous/9494008 to your computer and use it in GitHub Desktop.
diff --git a/app/models/concerns/nested_ancestry_common.rb b/app/models/concerns/nested_ancestry_common.rb
index 76fe555..44abbc7 100644
--- a/app/models/concerns/nested_ancestry_common.rb
+++ b/app/models/concerns/nested_ancestry_common.rb
@@ -14,8 +14,6 @@ module NestedAncestryCommon
validates :title, :presence => true, :uniqueness => true
scoped_search :on => :title, :complete_value => true, :default_order => true
- # for legacy purposes, keep search on :label
- scoped_search :on => :title, :complete_value => true, :rename => :label
# attribute used by *_names and *_name methods. default is :name
attr_name :title
diff --git a/app/models/hostgroup.rb b/app/models/hostgroup.rb
index 8b72459..eda28c0 100644
--- a/app/models/hostgroup.rb
+++ b/app/models/hostgroup.rb
@@ -38,6 +38,8 @@ class Hostgroup < ActiveRecord::Base
scoped_search :in => :puppetclasses, :on => :name, :complete_value => true, :rename => :class, :operators => ['= ', '~ ']
scoped_search :in => :environment, :on => :name, :complete_value => :true, :rename => :environment
scoped_search :on => :id, :complete_value => :true
+ # for legacy purposes, keep search on :label
+ scoped_search :on => :title, :complete_value => true, :rename => :label
if SETTINGS[:unattended]
scoped_search :in => :architecture, :on => :name, :complete_value => :true, :rename => :architecture
scoped_search :in => :operatingsystem, :on => :name, :complete_value => true, :rename => :os
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment