Fixed bug: Zendesk additional fields ending with _id or _ids fail import due to ObjectManager attribute naming limitations.

This commit is contained in:
Thorsten Eckel 2017-08-18 16:03:26 +02:00
parent 4ddd3ec29b
commit c25d7507d5

View file

@ -15,7 +15,7 @@ module Import
private
def local_name(object_field)
@local_name ||= remote_name(object_field).gsub(%r{[\s\/]}, '_').underscore.gsub(/_{2,}/, '_')
@local_name ||= remote_name(object_field).gsub(%r{[\s\/]}, '_').underscore.gsub(/_{2,}/, '_').gsub(/_id(s?)$/, '_no\1')
end
def remote_name(object_field)