lib/mutils/serialization/serialization_results.rb in mutils-0.2.32 vs lib/mutils/serialization/serialization_results.rb in mutils-0.2.33
- old
+ new
@@ -24,10 +24,10 @@
end
def fetch_attributes(attributes)
hash = {}
attributes&.keys&.each do |key|
- hash[key] = attributes[key.to_s.to_sym][:method] ? send(key) : scope.send(key)
+ check_if_included(attributes, key) && (hash[key] = attributes[key][:method] ? send(key) : scope.send(key))
end
hash
end
def hash_relationships(relationships_array)