Commit Graph
726 Commits
Author SHA1 Message Date
Skud 668cb33f15 Added more units for harvests 2013-10-01 12:35:41 +10:00
Skud c452d38717 If quantity == 0, set it to nil 2013-09-25 16:07:22 +10:00
Skud c5e8e4298f Separated informal/human units from measured weights 2013-09-25 15:39:17 +10:00
Skud c3c3c435d5 improve display of quantities 2013-09-23 10:03:08 +10:00
Skud c63fc97736 Validate quantity/unit for harvests
If quantity is blank, we also set unit to blank.
2013-09-17 17:56:00 +10:00
Skud 2196bc8373 Added associations between harvests, crops, and members 2013-09-17 15:51:30 +10:00
Skud 37383ba451 rails g scaffold Harvest... 2013-09-17 15:39:25 +10:00
Skud faea1904c2 Added referral code search to admin forms 2013-09-13 13:47:46 +10:00
Skud 1adcedb534 moved admin order search into a model method 2013-09-13 13:38:11 +10:00
Skud 2422182aa8 Added referral_code to Order
Also added validation (alphanumeric), but we're fairly lax about
whitespace and case, and clean up for them if they make minor errors.
2013-09-13 12:14:17 +10:00
Skud b39df447b6 Merge pull request #307 from Skud/places3
Places - finally fixed?
2013-09-10 21:00:54 -07:00
Skud 138318e5f4 Moved searching for nearby members into the model 2013-09-11 13:14:52 +10:00
Skud 4dbfecd315 Added toplevel scope for crops without a parent 2013-09-02 11:52:01 +10: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
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
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 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
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 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 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 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 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 ee39156036 Only interesting (locatable) seeds are shown on homepage 2013-08-07 16:25:38 +10:00
Skud 3122aa6484 Shuffle interesting crops 2013-08-07 16:16:08 +10:00
Skud a1383ad9b6 don't count empty strings as interesting locations 2013-08-07 16:13:31 +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 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
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 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