Have you tried making an acutal function


def jsonVersion = ...


On 19 June 2013 12:50, Darren Hurley <notifications@github.com> wrote:

> In applications/app/controllers/SectionController.scala:
>
> > @@ -54,8 +54,13 @@ object SectionController extends Controller with Logging with Paging with JsonTr
> >    }
> >
> >    private def renderSectionFront(model: SectionFrontPage)(implicit request: RequestHeader) = {
> > -    val htmlResponse = () => views.html.section(model.section, model.editorsPicks, model.latestContent)
> > -    val jsonResponse = () => views.html.fragments.sectionBody(model.section, model.editorsPicks, model.latestContent)
> > +    val numTrails = math.max(model.editorsPicks.length, 15)
> > +    val trails = (model.editorsPicks ++ model.latestContent).take(numTrails)
> > +    val htmlResponse = () => views.html.section(model.section, trails)
> > +    lazy val jsonResponse = Map(
>
> Ah, bummer. I took it out of a function because the overloaded function
> https://github.com/guardian/frontend/blob/886d2cdb93f40d90da32704cd65e6421962890af/common/app/common/package.scala#L74was failing due to the return type of the function argument being erased
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/guardian/frontend/pull/1068/files#r4770395>
> .
>

Please consider the environment before printing this email.
------------------------------------------------------------------
Visit guardian.co.uk - website of the year
 
www.guardian.co.uk    www.observer.co.uk     www.guardiannews.com   www.guardian.co.uk/australia
 
On your mobile, visit m.guardian.co.uk or download the Guardian
iPhone app www.guardian.co.uk/iphone and iPad edition www.guardian.co.uk/iPad 
 
Save up to 32% by subscribing to the Guardian and Observer - choose the papers you want and get full digital access. 
Visit guardian.co.uk/subscribe
 
---------------------------------------------------------------------
This e-mail and all attachments are confidential and may also
be privileged. If you are not the named recipient, please notify
the sender and delete the e-mail and all attachments immediately.
Do not disclose the contents to another person. You may not use
the information for any purpose, or store, or copy, it in any way.
 
Guardian News & Media Limited is not liable for any computer
viruses or other material transmitted with or as part of this
e-mail. You should employ virus checking software.
 
Guardian News & Media Limited
 
A member of Guardian Media Group plc
Registered Office
PO Box 68164
Kings Place
90 York Way
London
N1P 2AP
 
Registered in England Number 908396