updateRecord should use record.serialize

amespace.records[id] = record.toJSON({ includeId: true });
changed to
namespace.records[id] = record.serialize({ includeId: true });

serializer shouldn't be a fixed one.