diff --git a/lib/flags.rb b/lib/flags.rb index 175aaa84..00f29866 100644 --- a/lib/flags.rb +++ b/lib/flags.rb @@ -1,8 +1,7 @@ class CustomWizard::Flag - def initialize(id, name, value) - @id = id - @name = name - @value = value + def initialize(id, name) + @id = id + @name = name end def id @@ -12,10 +11,6 @@ class CustomWizard::Flag def name @name end - - def value - @value - end end class CustomWizard::Flags @@ -25,8 +20,10 @@ class CustomWizard::Flags flagscollection = [] - raw_flags.map do |name, code| - flagscollection << CustomWizard::Flag.new(name, name, code) + raw_flags.map do |name, pic| + # This is super hacky. Adding the trailing space actually stops search breaking in the dropdown! (and doesn't compromise the view!) + # Feeding just name, name will break search + flagscollection << CustomWizard::Flag.new(name, "#{name} ") end flagscollection