Commit Graph

261 Commits

Author SHA1 Message Date
Skud
25cb3fd469 Fixed scientific name upload bug and wrote tests
Wrote unit tests and refactored Crop.create_from_csv

The actual bug (now fixed) is that if you didn't specify a SN in the
CSV, it would try and pick it up from the parent crop, but then the
testing for "is this a dup?" was based on what was in the CSV and didn't
take that parent SN into account.  This is now fixed.
2014-10-15 13:58:21 +01:00
Skud
374987488f Fixed broken tests. 2014-09-12 08:30:44 +10:00
Skud
85b5ac12ca added validation for finished_at (must be after planted_at) 2014-09-12 07:50:25 +10:00
Skud
e0485ade1d Added test to make sure the wrong plantings aren't finished 2014-09-10 08:06:07 +10:00
Skud
af2d0e22ee Automatically set plantings to finished when a garden is marked inactive 2014-08-30 10:51:33 +10:00
Skud
e7dd50c3f1 Added scopes for finished and current plantings 2014-08-30 09:28:02 +10:00
Skud
b07d9d8db0 Added finished fields for plantings 2014-08-30 09:27:41 +10:00
Skud
c68b029d50 Switch to match_array to get around spuriously failing tests 2014-08-28 10:16:31 +10:00
Marlena Compton
36199054c0 changed method so that you can now call crop_wranglers and admins. meta-programming ftw 2014-08-21 20:11:10 -07:00
Marlena Compton
13e015b441 fixed role factory to not create extra roles when new members 2014-08-21 20:11:10 -07:00
Marlena Compton
ec25f2ab91 created list of crop wranglers on the crop wranglers page 2014-08-21 20:11:10 -07:00
Mackenzie Morgan
f3c3d73ef1 updating test for harvest units to list the valid units and adding a task to correct misspelled pint harvests already in the database 2014-08-10 19:49:10 -04:00
Mackenzie Morgan
0a256a2dd0 update harvest model test for oz 2014-07-30 09:15:53 -04:00
Skud
846a2c89c5 Tweaked FactoryGirl to use create_list 2014-07-20 19:29:06 +10:00
Skud
aeb14021f3 Removed unpopular scope (guess it really was unpopular) 2014-07-18 18:17:37 +10:00
Skud
573e555bcf Added unpopular scope to crop 2014-07-18 17:52:11 +10:00
Skud
c9857bf1c8 popular scope for crops 2014-07-18 17:38:15 +10:00
Skud
77d2b0e950 make crop search case insensitive 2014-07-06 20:16:59 +10:00
Mackenzie Morgan
062add32dc Add 'root/tuber' to 'planted from:' list, for things like potatoes 2014-05-04 22:46:45 -04:00
Skud
1c34d428f2 Merge branch 'crop-search' of https://github.com/Skud/growstuff into Skud-crop-search
Conflicts:
	spec/models/crop_spec.rb
2014-04-29 11:16:20 +10:00
Skud
addd9cbddf Added search method to crops
For now it just does a naive SQL LIKE query. We can make this fancier in
future, if we want to.
2014-01-03 21:50:41 +11:00
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