Skip to content

Instantly share code, notes, and snippets.

@ssouris
Last active June 2, 2017 17:05
Show Gist options
  • Save ssouris/65fea29cea6a1131fed12bb97ac75fc2 to your computer and use it in GitHub Desktop.
Save ssouris/65fea29cea6a1131fed12bb97ac75fc2 to your computer and use it in GitHub Desktop.
fun goToOwnersIndex() : Mono<ServerResponse> {
return ok().html().render("owners/index",
mapOf("owners" to ownersRepository.findAll().map { Pair(it, emptySet<Pet>()) },
"pets" to petRepository.findAll().collectMultimap { it.owner }))
}
// using type inference
fun goToOwnersIndex() = ok().html().render("owners/index",
mapOf("owners" to ownersRepository.findAll().map { Pair(it, emptySet<Pet>()) },
"pets" to petRepository.findAll().collectMultimap { it.owner }))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment