Skud
b86014b04f
attempting to fix libv8 problem occurring on heroku
2014-04-28 13:02:23 +10:00
Miles Gould
79f96f5ef4
Insist that crops created by db:seed are new.
...
This shaves 2s off the 22s runtime of `rake db:seed` on my machine.
2014-01-10 18:11:27 +00:00
Miles Gould
338a7512e8
Explain reordering of plant_parts in a comment.
2014-01-02 11:04:57 +00:00
Miles Gould
18ccb0d9fb
Merge branch 'dev' into harvest-parts
...
Conflicts:
spec/models/harvest_spec.rb
2013-12-03 13:25:18 +00:00
Miles Gould
2a260abf05
Fix Postgres problem with PlantParts#crops
...
Postgres complains if the ORDER BY clause of a SELECT DISTINCT query is
not precisely one of the SELECTed fields. The default sort order on
crops is lower(name), and Postgres is not smart enough to notice that it
can calculate this from fields which are selected. The solution is to
override PlantParts#crops to remove the ORDER BY clause, and replace it
with `ORDER BY name`. This is not perfect, because it means the crops
associated to plant parts will not be sorted in the same order as crops
on the rest of the site.
2013-12-03 12:56:57 +00: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
084bdc4f40
Add friendly URLs to plant parts.
2013-10-31 00:19:48 +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
5302dd58b1
Added pollen as a harvestable plant part
2013-10-29 17:31:16 +11:00
Skud
7a5bfa5e07
Added 'other' and 'whole plant' to harvestable plant parts
2013-10-29 17:28:51 +11:00
Skud
721692277d
Added plant_part validation to harvest model
2013-10-29 17:17:12 +11:00
Skud
f89c5e5b86
Added plant_part attribute to harvest
2013-10-29 17:00:32 +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
96b5a6cd94
Added new garden fields to gardens/show
2013-10-25 22:48:02 +11:00
Skud
aee35aeeca
Added new fields to garden form
2013-10-25 22:32:40 +11:00
Skud
803f8244c9
Added various fields to garden
...
- active (default: true)
- location, latitude and longitude (because when you move house, you
don't take your garden with you)
- area and area units (square feet or metres)
2013-10-25 21:54:13 +11:00
Skud
52716df6e9
Fixing up confused crop names from two recent pull requests
2013-10-25 12:26:58 +11:00
Skud
a25ba32476
Merge branch 'system_name_to_name' of https://github.com/pozorvlak/growstuff into pozorvlak-system_name_to_name
...
Conflicts:
db/seeds.rb
2013-10-25 12:14:01 +11:00
Miles Gould
9c5b6f6192
Rename Crop.system_name to Crop.name
2013-10-18 11:52:05 +01:00
Skud
ed01c6fb29
Added some comments/docs to Crop.create_from_csv
2013-10-17 22:49:57 +11:00
Skud
c46e19e43e
Load multiple crop CSV files from seeds.rb
...
We factored out a Crop.create_from_csv method to avoid duplicated code.
Note: naming convention with db/seeds/crop*.csv is to use a 2-digit
number for ordering. 00 and 10 chosen (with a gap in between) because I
learned to program in BASIC and it seemed like a good idea just in case.
2013-10-17 22:45:09 +11: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
9667f43874
Added friendly urls to harvests
2013-09-17 18:02:48 +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
40ce4ab77b
Validate units (must be one of individual/bunches/kg/lb)
...
Also changed "units" attribute to "unit". Oops, we weren't following the
Rails naming convention.
2013-09-17 17:26:18 +10:00
Skud
ccb0e42c95
Prettified harvest form
...
Also renamed "notes" to "description" in database
2013-09-17 16:08:41 +10:00
Skud
67b88e8e18
set cancan abilities for harvests
2013-09-17 15:53:51 +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
fef92f0d14
Added tests for admin order controller
2013-09-13 14:19:46 +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
8994b5f5fc
Added caching of full crop hierarchy
...
... as that page is really slow to load at present.
2013-09-13 11:24:03 +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
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
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
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