Commit Graph

2454 Commits

Author SHA1 Message Date
Brenda Wallace
6663f3ade4 Add id and type back to photos#new 2017-11-24 19:02:54 +13:00
Brenda Wallace
d4e4ca6519 Move planting's add photo button to _actions.haml 2017-11-24 19:02:54 +13:00
Brenda Wallace
284f0cddcd Fix gardens actions, and add specs
A bug slipped into all garden display pages - and there were no tests that caught it.
This adds feature specs for gardens#index, which would have detected the un-initialised
variable in haml
2017-11-24 19:02:54 +13:00
Logan Gingerich
4ced7ee7e9 Whitespace fix, spec fix, and spec addition 2017-11-24 19:02:54 +13:00
Logan Gingerich
b60510e016 deleted line 70 on plantings view to clean up logic 2017-11-24 19:02:54 +13:00
Logan Gingerich
e85daa405b Moved add photo button from garden show view to garden actions 2017-11-24 19:02:54 +13:00
Logan Gingerich
9ab83f7bbc Adds a more prominent add photo button to garden and planting show views 2017-11-24 19:02:54 +13:00
Brenda Wallace
4743fc7a63 Feature spec for showing item details on photo adding page 2017-11-24 19:02:54 +13:00
Brenda Wallace
f98bb32612 Shaved some yaks to remove a rescue from a controller 2017-11-24 19:02:54 +13:00
Brenda Wallace
771443ee85 Removed rescue in a controller 2017-11-24 19:02:54 +13:00
Brenda Wallace
1322ebd8e3 Use the ||= operator 2017-11-24 19:02:54 +13:00
Brenda Wallace
9e98db423e Tidy up photos logic, and test of signin/out on photos#new 2017-11-24 19:02:54 +13:00
Logan Gingerich
305702f644 Refactored and specs updated 2017-11-24 19:02:54 +13:00
Logan Gingerich
1f4f806bb0 Now displays correctly for planting, harvest or garden 2017-11-24 19:02:54 +13:00
Logan Gingerich
6a17ba547f fixes #1433 Says what item you're adding a photo to on photos#new 2017-11-24 19:02:54 +13:00
Brenda Wallace
c4a1806a87 Request spec for photos api 2017-11-17 22:01:37 +13:00
Brenda Wallace
13e8d1f5a5 Merge remote-tracking branch 'upstream/dev' into api 2017-11-17 21:51:39 +13:00
Brenda Wallace
c1836cc78e Removed un-used method, to reduce class size 2017-11-17 21:50:59 +13:00
Brenda Wallace
28fdb6e1ed Reducing class line count 2017-11-17 21:50:59 +13:00
Brenda Wallace
67dec795a0 Reinstated test of first harvest prediction display 2017-11-17 21:50:59 +13:00
Brenda Wallace
86ea8eab39 Reducing crop class size 2017-11-17 21:50:59 +13:00
Brenda Wallace
8884056ff3 Run existing crop specs with annual crop 2017-11-17 21:50:59 +13:00
Brenda Wallace
d01a5d7976 Don't show lifespan of perennials 2017-11-17 21:50:59 +13:00
Shiny
1795b27152 Merge branch 'dev' into feature/planting-garden-owner-match 2017-11-13 23:09:04 +13:00
Shiny
df7a9448b0 Underscore prefix on our last unused args (#1442) 2017-11-13 09:54:55 +00:00
Brenda Wallace
5fec826c41 Add more attributes to crops 2017-11-13 19:19:18 +13:00
Brenda Wallace
d8f5876518 Added predictions to planting api, and added specs 2017-11-13 19:19:18 +13:00
Brenda Wallace
c9d5c42814 Plantings have many harvests 2017-11-13 19:19:18 +13:00
Brenda Wallace
b60f47f502 Add more relationships to members on the api 2017-11-13 19:19:18 +13:00
Brenda Wallace
fc0058d677 all our api controllers inheriting from base 2017-11-13 19:19:18 +13:00
Brenda Wallace
41110f96d1 Put immutable on every resource 2017-11-13 19:19:18 +13:00
Brenda Wallace
33822abf93 crops have harvests 2017-11-13 19:19:18 +13:00
Brenda Wallace
5877da95a6 Added a base resource, a little more DRY 2017-11-13 19:19:18 +13:00
Brenda Wallace
d07fd1a277 Added seeds and harvests to api, and tidied up resources 2017-11-13 19:19:18 +13:00
Brenda Wallace
c96695258b Basic read only api 2017-11-13 19:19:18 +13:00
Brenda Wallace
a2ae429f6b If a harvest has a planting, it must have the same owner 2017-11-13 19:18:14 +13:00
Brenda Wallace
c6824b1262 Planting's owner must be the same as its garden's owner 2017-11-13 19:18:14 +13:00
Brenda Wallace
205247b136 Shorter condition in haml view (progress) 2017-11-09 17:36:37 +13:00
Brenda Wallace
963a182981 simplified logic in planting's first/last harvest fetcher 2017-11-09 17:36:33 +13:00
Brenda Wallace
809dd81378 "Changed last_harvest" to "days_to_last_harvest" 2017-11-08 17:17:58 +13:00
Brenda Wallace
62beec23a1 "Changed first_harvest" to "days_to_first_harvest" 2017-11-08 17:17:15 +13:00
Brenda Wallace
a60a5ce591 Added a space, to please hound 2017-11-07 09:46:19 +13:00
Brenda Wallace
bf6475da57 annual? perennial!=true 2017-11-06 23:15:08 +13:00
Brenda Wallace
c5971cd46b A little bit of eager loading 2017-11-06 23:13:36 +13:00
Brenda Wallace
2f47eeb7b3 Bug fix. Can only predict if we have harvested_at and planted_at 2017-11-06 23:12:28 +13:00
Brenda Wallace
928749aaad Changed a "Pictures" header to "Photos" to be consistent 2017-11-06 23:11:39 +13:00
Brenda Wallace
1d64d4d1d2 Clearer message that predctions are for days after planting 2017-11-06 23:10:55 +13:00
Brenda Wallace
1e86cf7662 Update planting medians after updating record
So changes to the planted_at are re-calculated
2017-11-06 23:07:44 +13:00
Brenda Wallace
941dab7c4a Crop.annual? method 2017-11-06 23:00:16 +13:00
Brenda Wallace
2696d12771 Removed duplicate display of last harvest 2017-11-06 22:59:04 +13:00