Module: MoveToGo::ModelWithIntegrationIdSameAs

Included in:
CustomField, CustomFieldReference
Defined in:
lib/move-to-go/model_helpers.rb

Instance Method Summary collapse

Instance Method Details

#same_as?(other) ⇒ Boolean

check if other is same as regarding integration_id or id

Returns:

  • (Boolean)


62
63
64
65
66
67
68
69
70
# File 'lib/move-to-go/model_helpers.rb', line 62

def same_as?(other)
    if @integration_id != nil && @integration_id == other.integration_id
        return true
    end
    if @id != nil && @id == other.id
        return true
    end
    return false
end