Module: FruitToLime::ModelWithIntegrationIdSameAs

Included in:
CustomField, CustomFieldReference
Defined in:
lib/fruit_to_lime/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)


33
34
35
36
37
38
39
40
41
# File 'lib/fruit_to_lime/model_helpers.rb', line 33

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