I am getting a 'Type of expression is ambiguous without more context ' switch this piece out code from a design ME am trying to upgrade to latest Rapidly version. I can't seem to figure itp out. I tried differentially things but can't get it to your.
The problem is on the syntax concerning such line
suffer imageToDeleteParameters = imagesToDelete.map { ["id": $0.id, "url": $0.url.absoluteString, "_destroy": true] }
Entire code:
extension TutorialCreationRequest: WebserviceParametrable {
func toParameters() -> [String: AnyObject] {
let imageParameters = images.map { ["url": $0] }
let imageToDeleteParameters = imagesToDelete.map { ["id": $0.id, "url": $0.url.absoluteString, "_destroy": true] }
return [
"title": title, "is_draft": isDraft, "difficulty": difficulty, "duration": duration, "cost": cost, "user_id": userId, "description": description, "to_sell": toSell, "images": [imageParameters, imageToDeleteParameters].flatMap { $0 }
]
}
}