Commit Graph

240 Commits

Author SHA1 Message Date
pozorvlak
06f1d9cb7e Merge pull request #338 from Skud/crop-mentions
Crop mentions
2014-01-02 03:16:40 -08:00
Miles Gould
18ccb0d9fb Merge branch 'dev' into harvest-parts
Conflicts:
	spec/models/harvest_spec.rb
2013-12-03 13:25:18 +00:00
Skud
11e7055497 Improved case (in-)sensitivity in tests 2013-11-11 11:11:35 +11:00
Skud
60eb4c7296 Show aggregate 'grown from' data on crop page 2013-11-06 11:21:08 +11:00
Skud
ba27bb6490 plant parts have crops through harvests 2013-11-06 10:38:50 +11:00
Skud
ac5027ec27 Can't delete plant parts that are being used 2013-11-06 10:38:28 +11:00
Miles Gould
1b85326549 Test that only admins can manage plant parts. 2013-10-31 00:02:59 +00:00
Miles Gould
e9a3c0f4ee rails g scaffold PlantPart...
Also migration to remove the string plant_part.
2013-10-30 23:32:20 +00:00
Skud
721692277d Added plant_part validation to harvest model 2013-10-29 17:17:12 +11:00
Skud
0ae0e54369 Sort harvests by created_at DESC 2013-10-29 15:17:01 +11:00
Skud
aee0adde43 Added active/inactive scopes 2013-10-25 22:58:40 +11:00
Skud
aee35aeeca Added new fields to garden form 2013-10-25 22:32:40 +11:00
Miles Gould
9c5b6f6192 Rename Crop.system_name to Crop.name 2013-10-18 11:52:05 +01:00
Skud
219b6e3bbc Merge pull request #326 from Skud/harvests
Harvests
2013-10-01 19:20:43 -07:00
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