diff --git a/lib/controlled_vocabulary_helper.rb b/lib/controlled_vocabulary_helper.rb index e17a6a3..69318e9 100644 --- a/lib/controlled_vocabulary_helper.rb +++ b/lib/controlled_vocabulary_helper.rb @@ -1,7 +1,7 @@ module ControlledVocabularyHelper def self.get_categories_as_options - categories = [] + categories = ["".html_safe] ControlledVocabulary.attribute_names.each do |attribute| if attribute.to_s != "id" && attribute.to_s != "software_info_id" then diff --git a/views/search/search_forms/_software_fields.html.erb b/views/search/search_forms/_software_fields.html.erb index 9aa877e..76e312e 100644 --- a/views/search/search_forms/_software_fields.html.erb +++ b/views/search/search_forms/_software_fields.html.erb @@ -7,28 +7,28 @@ <%= _("Database") %> - <%= select_tag("database_description", SoftwareHelper.select_options(DatabaseDescription.all)) %> + <%= collection_select(:database_description, :id, DatabaseDescription.all, :id, :name, :prompt=>_("Any")) %> <%= _("Programming Language") %> - <%= select_tag("programming_language", SoftwareHelper.select_options(ProgrammingLanguage.all)) %> + <%= collection_select(:programming_language, :id, ProgrammingLanguage.all, :id, :name, :prompt=>_("Any")) %> <%= _("Operating System") %> - <%= select_tag("operating_system", SoftwareHelper.select_options(OperatingSystemName.all)) %> + <%= collection_select(:operating_system, :id, OperatingSystemName.all, :id, :name, :prompt=>_("Any")) %> <%= _("Controlled Vocabulary") %> - <%= select_tag("controlled_vocabulary", ControlledVocabularyHelper.get_categories_as_options) %> + <%= select_tag("controlled_vocabulary", (ControlledVocabularyHelper.get_categories_as_options)) %> -- libgit2 0.21.2