From 050d107a7fbc1b36b2387858f29179cb8c8c2406 Mon Sep 17 00:00:00 2001 From: Milan Zazrivec Date: Thu, 30 Nov 2017 14:18:34 +0100 Subject: [PATCH] Use type names directly from GenericObjectDefinition object --- app/controllers/api/generic_object_definitions_controller.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/api/generic_object_definitions_controller.rb b/app/controllers/api/generic_object_definitions_controller.rb index f2377ee4e4..aea06796ba 100644 --- a/app/controllers/api/generic_object_definitions_controller.rb +++ b/app/controllers/api/generic_object_definitions_controller.rb @@ -104,9 +104,7 @@ def self.allowed_association_types end def self.allowed_types - GenericObjectDefinition::TYPE_MAP.keys.collect do |type| - [Dictionary.gettext(type.to_s, :type => :data_type, :notfound => :titleize, :plural => false), type.to_s] - end.sort + GenericObjectDefinition::TYPE_NAMES.stringify_keys.invert.to_a.sort end def options