Commit Graph
1297 Commits
Author SHA1 Message Date
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
Skud 749a9b8fdc Added seeds and people to homepage 2013-08-07 13:21:27 +10:00
Skud 56e7b8392f refactored interesting crops 2013-08-07 13:21:27 +10:00
Skud 2cd298fbde refactored 'interesting plantings' 2013-08-07 13:21:26 +10:00
Skud 4bcc408236 added recent scope for crops 2013-08-07 13:21:26 +10:00
Skud 82da4a09f0 added default sort (created at desc) to seeds 2013-07-26 14:37:12 +10:00
Skud fd466e795b Minor tweaks to seed trading:
- changed "Will trade to" to "Will trade" on seeds/show page
- on crop page, only list tradable seeds (not "nowhere" ones) -- did
this by adding a tradable scope to Crop
- on crop page, say "(location unknown)" where necessary
- change heading on crop page to "Find seeds"
- show "Find seeds" heading regardless of whether any are available, and
say there are none if there aren't any, along with a link to add some
- moved "sign in or sign up to add seeds" to under the Find seeds area
2013-07-24 11:20:47 +10:00
Miles Gould b7cbadf84a Merge branch 'dev' into seed_trade
Conflicts:
	spec/views/crops/show.html.haml_spec.rb
2013-07-23 12:59:41 +01:00
Skud 292f5185ec Merge pull request #256 from Skud/seed_trade
Seed trade
2013-07-23 04:47:51 -07:00
Miles Gould da15994a46 Merge branch 'dev' into seed_trade
Conflicts:
	spec/views/crops/show.html.haml_spec.rb
2013-07-23 12:32:21 +01:00
Skud 470f8f2f22 allow nil/blank qtys for plantings/seeds 2013-07-23 21:19:21 +10:00
Skud bdc267b044 added slug for seeds 2013-07-23 21:14:24 +10:00
Skud e17f5d6599 Merge pull request #255 from Skud/photo_set
Photo set
2013-07-23 03:47:36 -07:00
Skud 2185f257c0 set 'nowhere' as default seed.tradable_to 2013-07-23 20:43:13 +10:00
Skud d227da891e Merge branch 'dev' into seed_trade 2013-07-23 20:21:58 +10:00
Skud 2b6bdeda16 Merge branch 'dev' of https://github.com/Growstuff/growstuff into dev
Conflicts:
	spec/views/crops/show.html.haml_spec.rb
2013-07-23 19:35:31 +10:00
Ryan Clark a87db0e406 Show list of seeds for trade on crop/show 2013-07-22 21:15:05 -07:00
Skud 52a00c5ed4 added numeric validation to qty for planting/seed 2013-07-22 16:40:42 +10:00
Skud 3a96cd96df removed tradable boolean field
we're now relying just on the "tradable_to" field, which is clearer.
2013-07-22 15:47:25 +10:00
Skud 8d9fc66cd5 cleaned up member.flickr_photos based on flickraw author's advice 2013-07-19 00:17:43 +10:00
Miles Gould 2b863cd62e Fix problem adding photos from photosets.
When we fetched photos from a photoset, the response object didn't
respond to to_a, breaking our controller code. This turned out to be due
to weirdness in FlickRaw's API:
https://github.com/hanklords/flickraw/issues/58
2013-07-18 14:16:22 +01:00
Miles Gould 8b3c1e9c1d Typo fix. 2013-07-18 12:41:59 +01:00
Ryan Clark e9dd18d977 Added tradable and tradable_to to seeds 2013-07-17 18:25:55 -07:00
Ryan Clark 973567bfdc Remane use_by to plant_before to humor Skud 2013-07-17 18:24:12 -07:00
Ryan Clark 6729a8a28c Pass set to member.flickr_photos - broken\! 2013-07-16 18:52:13 -07:00
Ryan Clark 106c3a74ba Display a set dropdown on the new photo page. 2013-07-16 18:27:06 -07:00
Skud 491e97c997 connected seeds into other parts of the site 2013-07-15 23:29:14 +10:00
Skud cc711a0a48 prettified seed-related views 2013-07-15 22:53:30 +10:00
Skud 91ea5146ac rails g scaffold seed... 2013-07-15 22:53:29 +10:00
Skud ece34149a2 need to test sunniness/planted_from.blank? 2013-07-11 22:15:56 +10:00
Miles Gould 4d9ddd2707 Crop: method to return hash of planted_from frequencies
Also tidied up tests which relied on the default planting factory having
a planted_from value set.
2013-07-11 13:01:52 +01:00
Miles Gould fbc64a1ee2 Crop: method to return hash of sunniness values. 2013-07-11 12:13:38 +01:00
Skud 7801a7ec09 Merge branch 'dev' into staff 2013-07-09 10:05:37 +10:00
Skud ec80b01c7a cleaning up tests on postgres
- still trying to make sure we explicitly use a real member, not just
assume there's one with id = 1

- also it looks like the tests for post activity are passing for obscure
reasons on sqlite when they shouldn't be. this is a known bug
(https://www.pivotaltracker.com/story/show/51280861) apparently
invisible to us under sqlite.
2013-07-08 12:18:51 +10:00
Skud 878af07419 gave up on not_staff, shuffling interesting members instead 2013-07-08 11:54:55 +10:00