We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c242cc commit 4212acfCopy full SHA for 4212acf
lib/intercom/traits/api_resource.rb
@@ -24,6 +24,7 @@ def from_response(response)
24
25
def from_hash(hash)
26
hash.each do |attribute, value|
27
+ next if type_field?(attribute)
28
initialize_property(attribute, value)
29
end
30
initialize_missing_flat_store_attributes if respond_to? :flat_store_attributes
@@ -105,6 +106,10 @@ def call_setter_for_attribute(attribute, value)
105
106
self.send(setter_method, value)
107
108
109
+ def type_field?(attribute)
110
+ attribute.to_s == 'type'
111
+ end
112
+
113
def initialize_missing_flat_store_attributes
114
flat_store_attributes.each do |attribute|
115
unless instance_variables_excluding_dirty_tracking_field.map(&:to_s).include? "@#{attribute}"
0 commit comments