Skip to content

Commit

Permalink
Use type names directly from GenericObjectDefinition object
Browse files Browse the repository at this point in the history
  • Loading branch information
mzazrivec committed Dec 4, 2017
1 parent a70e73d commit 050d107
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/controllers/api/generic_object_definitions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 050d107

Please sign in to comment.