Navigation Menu

Skip to content

Commit

Permalink
Provide a shorthand to retrieve the Http.Context from templates
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrf authored and ph2734 committed May 15, 2012
1 parent 5a0997f commit 8abfa1b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions framework/src/play/src/main/java/play/mvc/Http.java
Expand Up @@ -131,6 +131,13 @@ public static play.i18n.Lang lang() {
return play.i18n.Lang.preferred(Context.current().request().acceptLanguages());
}

/**
* Returns the current context.
*/
public static Context ctx() {
return Context.current();
}

}

}
Expand Down

0 comments on commit 8abfa1b

Please sign in to comment.