Also removed distance/units from the places/show search, since you can
adjust nearness by zooming etc.
At this point the "members near here" stuff at the bottom of the page
exists mostly for accessibility and to give additional detail that we
don't currently show in the popups on the map.
So we're not using distance/units to search for members near here
anymore, but instead are just finding the 30 nearest members to the
specified location, and showing them in order of nearness.
We were getting annoying "couldn't close <p> with </script>" messages
when running tests, because escape_javascript was turning </p> into
<\/p>. We fixed this by gsub'ing \/ to / after calling
escape_javascript. What could possibly go wrong? :-)
This lets us do mail merges with the member's name, as well as letting
us segment mailouts by people who've signed up for Growstuff and those
who came to the newsletter directly without having a Growstuff account.
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).
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).
Refactored tests to take into account that plantings now have owners
directly, not via gardens. Mostly this was just tweaking FactoryGirl
calls to do the right thing.
Previously we got the owner indirectly, through the garden in which the
planting was planted. Now we're directly specifying an owner. This
allows us to let people plant things in each other's gardens.
Tests are probably broken at this point; we're about to refactor ALL THE
THINGS.
The little triangle underneath the popup was looking weird. Turns out
it was mostly because of some of the leaflet_ie.css stuff, so we made
sure that the non-IE CSS took precedence, and wrote in a little override
for an unwanted border as well.