Commit Graph

281 Commits

Author SHA1 Message Date
Miles Gould
d6972da84f Speed up geocoding/deal better with slow geocoding.
- set limit=1
 - set timeout=10s
2013-09-05 13:10:47 +01:00
Miles Gould
4701bd1b2e Merge branch 'dev' into places2
Conflicts:
	Gemfile.lock
	config/application.rb
	credentials.example
2013-08-31 15:49:30 +01:00
Miles Gould
087c2c5834 Remove extra whitespace. 2013-08-30 11:59:59 +01:00
Lilly
5c4ee581cc Added 'bulb' as a 'planted_from' option. 2013-08-30 15:08:23 +10:00
Skud
b73c4db17a Merge branch 'newsletter' of https://github.com/Skud/growstuff into Skud-newsletter
Conflicts:
	db/schema.rb
	spec/models/member_spec.rb
2013-08-29 00:06:44 +10:00
Miles Gould
2c6e2ee2d7 Merge branch 'dev' into places2
Conflicts:
	app/views/members/_popover.html.haml
2013-08-28 13:02:25 +01:00
Miles Gould
c955504ad7 Reinstate Geocoder lookup
Direct Nominatim lookups were playing badly with "nearby" method in
testing. The slowness is largely fixed in the HEAD revision of Geocoder.
2013-08-28 12:00:58 +01:00
Skud
0c5fae1274 Send Growstuff login_name to Mailchimp
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.
2013-08-28 10:42:40 +10:00
Skud
f747db7518 newsletter subscription/unsubscription via Mailchimp API 2013-08-27 22:45:18 +10:00
Skud
30bb877537 Added wants_newsletter scope to Member
also cleaned up member tests which were using FG.build instead of
.create
2013-08-27 21:34:30 +10:00
Skud
290535b557 Add newsletter subscription checkbox 2013-08-27 21:22:35 +10:00
Skud
99bfc704dc Added plantings_count (i.e. counter_cache) to Member
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).
2013-08-26 13:54:09 +10:00
Skud
475a402133 Refactor ALL THE THINGS
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.
2013-08-26 12:17:23 +10:00
Skud
1ad416269d Added owner to planting
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.
2013-08-26 12:17:06 +10:00
Miles Gould
8ce2798fb3 Fail gracefully if location is not found. 2013-08-23 14:12:04 +01:00
Miles Gould
7857bfd0df Merge branch 'dev' into places2
Fix up broken indentation on navbar.
Conflicts:
	app/views/layouts/_header.html.haml
2013-08-23 13:29:37 +01:00
Miles Gould
4e62991f22 Replace Geocoder lookups with direct calls to Nominatim.
This is because Geocoder-via-Nominatim was really really slow (up to
10s).
2013-08-23 13:11:02 +01:00
Skud
4cdb571e27 Merge pull request #284 from Skud/wrangler-homepage
added a basic crop wrangler homepage
2013-08-21 21:54:04 -07:00
Skud
9df8ec15ba Merge branch 'dev' of https://github.com/Growstuff/growstuff into member-bio
Conflicts:
	db/schema.rb
2013-08-22 13:15:02 +10:00
Skud
b47771d29c We need to refresh member thumbnails more often 2013-08-22 10:18:16 +10:00
Skud
c109905cb0 fixed recent activity sorting for posts 2013-08-21 21:42:58 +10:00
Skud
8f7becfa78 added a basic crop wrangler homepage 2013-08-21 21:24:22 +10:00
Skud
a5b2db3458 added creator to scientific names 2013-08-21 17:50:51 +10:00
Skud
57fe663675 Merge branch 'dev' of https://github.com/Growstuff/growstuff into places2
Conflicts:
	app/controllers/members_controller.rb
	app/models/member.rb
	app/views/members/_popover.html.haml
	spec/models/member_spec.rb
2013-08-21 17:35:31 +10:00
martyhines
e77f7fdf31 Added creator field to crops 2013-08-20 21:22:02 -04:00
Skud
347be0633b cache posts/forums on homepage 2013-08-20 18:59:13 +10:00
Skud
c64e0f5fc7 various tweaks/fixes for caching 2013-08-19 21:34:21 +10:00
Skud
ffdb881d5a Update interesting_plantings when photos added/removed 2013-08-19 20:57:59 +10:00
Skud
ccd0f9c46a got rid of last remnants of direct cache access 2013-08-19 18:15:14 +10:00
Skud
f0e3c88bd8 Break out interesting? into its own method 2013-08-19 18:09:39 +10:00
Skud
8c78651d05 Break out interesting? into its own method 2013-08-19 18:00:23 +10:00
Skud
b2ab29397e Cache interesting seeds fragment for homepage.
(refresh cache if any of them are deleted)
2013-08-19 17:59:10 +10:00
Skud
46cc7b3984 Fixing cache problems (really this time!?!?)
It seems that the .shuffle was causing all kinds of weirdness.  So, for
now, let's just get used to the fact that we won't have such a mixed set
of crops on the homepage.
2013-08-18 20:53:46 +10:00
Skud
ed0739d56c no need to return interesting_crops twice 2013-08-18 20:42:02 +10:00
Skud
b793762dc1 rearranged interesting methods a bit 2013-08-18 20:06:10 +10:00
Skud
9409fc6507 and another try and making caching work 2013-08-14 13:52:53 +10:00
Skud
a04c93f843 fixed caching errors (we weren't caching what we thought we were) 2013-08-14 13:38:05 +10:00
Skud
ebe36438ba Cache recent crops on homepage 2013-08-14 12:38:52 +10:00
Skud
f0d4ec2690 cache crop image with popover 2013-08-14 12:15:53 +10:00
Skud
7e98981c0a standardise on _id for caching 2013-08-14 12:09:11 +10:00
Skud
f6fea51ac3 cache planting snippets on homepage 2013-08-14 12:08:27 +10:00
Skud
e8cb5e89b6 Changed interesting methods to always return 12
... because it makes the caching more effective.  Use .first(n) to get a
smaller number if you want it.
2013-08-14 11:58:54 +10:00
Skud
5d3a44ae0c cache stats and member thumbnails on homepage 2013-08-14 11:47:09 +10:00
Skud
46aa6ec758 added caching to the Blah.interesting methods 2013-08-14 11:06:18 +10:00
Skud
32f2830df5 changed located scope to ignore blank lat/long 2013-08-12 10:46:35 +10:00
martyhines
0d5b2bbcce Added bio to member model 2013-08-08 21:38:01 -04:00
Skud
f9f929e508 Fixed locatable scope for pgsql (needs single quotes) 2013-08-07 16:46:21 +10:00
Skud
d5d004306b randomise crops on homepage 2013-08-07 16:33:39 +10:00
Skud
0e401c907e Only interesting (locatable) seeds are shown on homepage 2013-08-07 16:26:51 +10:00
Skud
937ef36b6d don't count empty strings as interesting locations 2013-08-07 16:26:41 +10:00