dev_cs_new
p31729568 6 years ago
parent d00bc73e2e
commit 882b4d38a8

@ -9,16 +9,15 @@ class Tiding < ApplicationRecord
def identifier
value = nil
if Object.const_defined?(container_type)
value = container.try(:identifier)
end
if value.blank? && parent_container_type && Object.const_defined?(parent_container_type)
value = parent_container_type.try(:identifier)
value = container.try(:identifier) rescue nil
if value.blank? && parent_container_type
value = parent_container_type.try(:identifier) rescue nil
end
if value.blank? && belong_container_type && Object.const_defined?(belong_container_type)
value = belong_container.try(:identifier)
if value.blank? && belong_container_type
value = belong_container.try(:identifier) rescue nil
end
value

Loading…
Cancel
Save