Taking a look at some sample code in the Play framework for Scala:
def show(ean: Long) = Action { implicit request =>
Product.findByEan(ean).map { product =>
Ok(views.html.products.details(product))
}.getOrElse(NotFound)
}
What is the job of implicit request
in this particular use case? Can the method be written without it and if request
is defined outside of the scope of this method (Which I believe it is anyway), can it not be referenced here? Not understanding what exactly it is doing here, so any insight would be great.