Sure. What's important is the test that should go with that change.

Max.


On 1 May 2014 11:35, Jairo Diaz <notifications@github.com> wrote:

> In app/views/courts/show.json.jbuilder:
>
> > @@ -19,7 +19,7 @@ if address = (addresses.postal.first || addresses.visiting.first)
> >    json.set! :address do
> >      json.set! "@type", 'PostalAddress'
> >      json.postalCode address.postcode if address.postcode?
> > -    json.addressRegion address.town.county.name if address.town.county.name?
> > +    json.addressRegion address.town.county.name if address.town.county.present? and address.town.county.name?
>
> I think you could do like this:
> json.addressRegion address.town.county.name if
> address.town.county.try(:name)
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/ministryofjustice/courtfinder/pull/167/files#r12183780>
> .
>