I’m trying to avoid typing long sentences in the parameter list.
Is this an idiom Scala way to archive that?
def createRecaptchaHtml: String = {
def config(s: String) = Play.current.configuration.getString(s).toString()
ReCaptchaFactory.newReCaptcha(config("recaptcha.publicKey") , config("recaptcha.privateKey"), false).createRecaptchaHtml(null, null)
Yes, this kind of local methods are perfect for that application. An alternative is to import the instance methods you need in the scope: