Merge pull request #4651 from ulferts/fix/freeze_mutable_constants

fix mutable constants
pull/4653/merge
ulferts 8 years ago committed by GitHub
commit 742cb3f866
  1. 10
      lib/api/v3/utilities/custom_field_injector.rb

@ -41,27 +41,27 @@ module API
'user' => 'User',
'version' => 'Version',
'list' => 'StringObject'
}
}.freeze
LINK_FORMATS = ['list', 'user', 'version']
LINK_FORMATS = ['list', 'user', 'version'].freeze
PATH_METHOD_MAP = {
'user' => :user,
'version' => :version,
'list' => :string_object
}
}.freeze
NAMESPACE_MAP = {
'user' => 'users',
'version' => 'versions',
'list' => 'string_objects'
}
}.freeze
REPRESENTER_MAP = {
'user' => Users::UserRepresenter,
'version' => Versions::VersionRepresenter,
'list' => StringObjects::StringObjectRepresenter
}
}.freeze
class << self
def create_value_representer(customizable, representer)

Loading…
Cancel
Save