Skip to content
This repository has been archived by the owner on Dec 10, 2018. It is now read-only.

Commit

Permalink
iss #22: code style
Browse files Browse the repository at this point in the history
  • Loading branch information
maizy committed Jun 17, 2014
1 parent 937de58 commit 7207899
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions app/hedgehog/clients/github/Config.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class Config(val apiBaseUrl: String) {
}
}


object Config {
def fromPlayApp(app: Application) = {
val baseUrl = app.configuration.getString("github.api_url")
Expand Down
6 changes: 2 additions & 4 deletions app/hedgehog/controllers/PostArguments.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ import play.api.mvc.{Controller, Request, AnyContent}
*/
trait PostArguments extends Controller {

def postArgSeq(name: String)(implicit request: Request[AnyContent]) : Option[Seq[String]] = {
def postArgSeq(name: String)(implicit request: Request[AnyContent]): Option[Seq[String]] =
request.body.asFormUrlEncoded.flatMap(_.get(name))
}

def postArg(name: String)(implicit request: Request[AnyContent]) : Option[String] = {
def postArg(name: String)(implicit request: Request[AnyContent]): Option[String] =
postArgSeq(name).map(_.last)
}
}
4 changes: 3 additions & 1 deletion app/hedgehog/views/ViewContext.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import play.api.Play.current
* Copyright (c) Nikita Kovaliov, maizy.ru, 2013
* See LICENSE.txt for details.
*/
class ViewContext (val controller: Request[AnyContent], val requestLang: i18n.Lang) {
class ViewContext(
val controller: Request[AnyContent],
val requestLang: i18n.Lang) {
lazy val availableLanguages = i18n.Lang.availables
val lang: i18n.Lang = requestLang
val hedgehogRepoUrl = "https://github.com/maizy/hedGeHog"
Expand Down

0 comments on commit 7207899

Please sign in to comment.