4
votes

I'm migrating an Play 2.4 application to 2.5 and now play.Play.application().isProd is deprecated. I use this in various places in scala.html templates. (To decide weather or not to use minimized javascript.)

It seems unreasonable to pass this in as parameters into every template.

Is there a way to inject the Application into the template directly?

1
Play 2.6 will introduce template constructors. playframework.com/documentation/2.6.x/…danielnixon

1 Answers

-1
votes

I used the same method in 2.4, in 2.5 I switched to play.Environment.simple().isProd