It seems that heroku generally denies us access to ENV['...'] during asset
compilation. They have reasonably good reasons for this, and yet I don't
know how else we're meant to get at our API keys (other than hardcoding
them into our config files, which we don't want to do).
So, to work around this, I'm recommending the use of the (experimental,
subject to removal/change, sigh) user-env-compile heroku addon. This
lets us use ENV during asset compilation.
For more info see
https://devcenter.heroku.com/articles/labs-user-env-compile
Also removed the superfluous .plantings_count method on Crop, which was
causing some confusion.
A thing we learned today: we should use .size to find the size of
ActiveRecord collections, not .count, because .count doesn't use the
cache (while .size does).