lib/mongoid/serializable.rb in mongoid-4.0.0.rc1 vs lib/mongoid/serializable.rb in mongoid-4.0.0.rc2

- old
+ new

@@ -100,10 +100,10 @@ if relations.has_key?(name) value = send(name) attrs[name] = value ? value.serializable_hash(options) : nil elsif names.include?(name) && !fields.has_key?(name) attrs[name] = read_attribute(name) - else + elsif !attribute_missing?(name) attrs[name] = send(name) end end # For each of the provided include options, get the relation needed and