unepwcmc/ProtectedPlanet — pull request #57 by adammulligan (2014-07-08 12:55:09+00:00)
Title: PA Show page no longer loads geometry in to Rails

This would be just a normal performance tweak, but has become an
unfortunate necessity as previously selecting a PA with large (many
points) geometry would crash the Rails process due to RGeo/AR trying to
load it in to memory as an object.

Example -- WDPA ID 2898

This adds a `.without_geometry` scope to `SELECT` all attributes except
`the_geom`, and changes the PA bounding box calculation to use pure SQL
as once again, large geometries and RGeo just don't mix.