Commit Graph

715 Commits

Author SHA1 Message Date
Brenda Wallace
910a9673dc Unsubscribes newsletter before member destroying 2017-06-09 22:39:07 +12:00
Brenda Wallace
bbc3ca749f Removed author_exists scope. It is part of default 2017-06-02 22:43:25 +12:00
Brenda Wallace
20b980a162 Helpful comment explains why we use act_as_paranoid 2017-06-02 22:42:03 +12:00
Brenda Wallace
fb012c073e leaves a record of orders and payments intact when members deleted 2017-06-02 22:34:19 +12:00
Brenda Wallace
c48e24845e Remove owner_exists scope 2017-06-02 20:28:32 +12:00
Shiny
7621da7041 Merge branch 'dev' into issue-1044-account-deletion 2017-05-30 20:39:44 +12:00
Brenda Wallace
8bcc5104e5 Delegate planting predictions 2017-05-29 22:45:14 +12:00
Brenda Wallace
3c8b80574a Small DRY of planting models -> predict added 2017-05-29 22:45:14 +12:00
Brenda Wallace
288ad782d2 Planted? = true when planted today 2017-05-29 22:45:14 +12:00
Brenda Wallace
ff1c835cda Moving the planting predictions to own service 2017-05-29 22:45:14 +12:00
Shiny
fedc7a7fb6 Merge branch 'dev' into issue-1044-account-deletion 2017-05-29 16:17:59 +12:00
Brenda Wallace
c22c92e9f4 Validates min price on product
the database has this constraint already. Adding so the ruby models
match.
2017-05-29 16:17:43 +12:00
Brenda Wallace
adf585852a Revert "Wikipedia url is always required"
This reverts commit ba5ad00f5c.
2017-05-29 16:17:43 +12:00
Brenda Wallace
b982793fbf Wikipedia url is always required
The form says it's required, so it should be required.
2017-05-29 16:17:43 +12:00
Brenda Wallace
6fef56ebb7 DRY the crops controller 2017-05-29 16:17:43 +12:00
Shiny
8f66009d0d Merge branch 'dev' into issue-1044-account-deletion 2017-05-29 15:56:17 +12:00
Brenda Wallace
8076e58a97 Owner must exist so we can see photos 2017-05-28 19:32:34 +12:00
Brenda Wallace
eacdab45ba Removed planting.with_dates 2017-05-28 18:44:26 +12:00
Brenda Wallace
dcb949e7b3 Fixed bug - error when planting has no finished_at 2017-05-28 18:10:53 +12:00
Brenda Wallace
4726b57c47 Inactive plantings show as tiny thumbnails 2017-05-28 17:13:04 +12:00
Brenda Wallace
0b684eb05e Checks owner exists, in default_scopes of many models 2017-05-26 23:00:06 +12:00
Brenda Wallace
7251f3308b Merge branch 'fix-1334' into issue-1044-account-deletion 2017-05-21 11:46:30 +12:00
Brenda Wallace
c4938e00e4 Member acts as paranoid 2017-05-21 11:33:12 +12:00
Brenda Wallace
b5b2582335 default scope says members deleted :false 2017-05-21 11:17:42 +12:00
Brenda Wallace
6e7bf11ec8 Seeds delegate name and default_photo to their crop 2017-05-20 17:00:49 +12:00
Brenda Wallace
5f9b0890fb Move seed.interesting to a scope 2017-05-20 16:58:49 +12:00
Brenda Wallace
4841c52bcd order crop.plant_parts by plant_parts.name 2017-05-20 15:46:37 +12:00
Brenda Wallace
7baabca827 Unique is un-necesary when declaring relationship to plant_parts 2017-05-20 15:46:37 +12:00
Brenda Wallace
9a19007b85 More railsy order by in models 2017-05-20 15:46:37 +12:00
Brenda Wallace
677f850e21 Removed extra blank line 2017-05-20 15:46:37 +12:00
Brenda Wallace
d771bc3688 More railsy syntax in default scopes 2017-05-20 15:46:37 +12:00
Brenda Wallace
1dfc58c120 Remove default scope from harvest.
Causes an ORDER clause to be added in queries even when not selecting
from that table. E.g. if we 're looking for PlantParts that have a
Harvest
2017-05-20 15:46:37 +12:00
Brenda Wallace
6f58f266a6 Moving has_photos scope to PhotoCapable
-
2017-05-20 15:46:37 +12:00
Brenda Wallace
ccc5eb3c9a Make calc_and_set_days_before_maturity public 2017-04-28 20:48:25 +12:00
Brenda Wallace
4ea681984f Call calc_and_set_days_before_maturity from controller 2017-04-28 20:48:25 +12:00
Brenda Wallace
787fca138b Added helpful comment about days_until_maturity 2017-04-28 20:48:25 +12:00
Brenda Wallace
b820615081 Moved planting maturity to planting model. simplified controller 2017-04-28 20:48:25 +12:00
Brenda Wallace
d2378376e4 Plantings validators
Adding garden presence true.
Checks crop presence before crop approved
2017-04-22 20:48:48 +12:00
Brenda Wallace
52b4064a2d Don't overwrite edited photo titles 2017-04-18 07:09:47 +00:00
Brenda Wallace
4711e4669f Layout change on photos 2017-04-18 07:09:47 +00:00
Brenda Wallace
f333607572 Reduced query count by .includes() on plantings 2017-04-17 08:59:34 +00:00
Daniel O'Connor
0201e873eb Merge branch 'dev' into fix_1305 2017-04-15 17:03:15 +09:30
Brenda Wallace
ac165ce0cd Adding counter caches 2017-04-14 11:32:31 +12:00
Daniel O'Connor
6ba4b4560e Fix #1305 by adding aggregation
Expand test coverage
member_id is owner_id on plantings
Argue with ActionView::Template::Error about what we can group on

Rename variable
2017-04-13 14:30:41 +12:00
Brenda Wallace
3791b34fe3 One planting per owner (used for intersetingness) 2017-03-28 22:39:03 +13:00
Brenda Wallace
5d58be110e Fixed crop.interesting, no more duplicate crops 2017-03-28 19:33:34 +13:00
Shiny
b72a3d6942 Merge branch 'dev' into query-optimising 2017-03-24 18:31:18 +13:00
Brenda Wallace
804ac8662a Rubocop fix ups 2017-03-24 17:29:39 +13:00
Brenda Wallace
1601e966ad Planting.interesting is in a scope 2017-03-24 16:59:09 +13:00
Brenda Wallace
5e8ca392d2 Moved Member.interest near top of file 2017-03-24 16:45:55 +13:00