Created
May 18, 2016 06:47
-
-
Save bolshakov/bf60b7ce066e46de8ddc694adbe2aa5e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def unbind(key: String, pagination: Pagination): String = { | |
val limit: Option[String] = pagination.limit.map(key + "[limit]=" + _) | |
val offset: Option[String] = pagination.offset.map(key + "[offset]=" + _) | |
return Seq(limit, offset).filter(_.isDefined).map(_.get).mkString("&") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
return Seq(limit, offset).flatten.mkString("&")