Brenda Wallace
8408fdc845
Moved popular plant plarts calculation into sql
2017-02-06 13:22:18 +13:00
Brenda Wallace
4ee789ca06
Popular plant parts are now sorted by popularity
2017-02-06 10:59:40 +13:00
pozorvlak
f8b84f390d
Calculate "count_uses_of_property" using DB query ( #1183 )
...
* Refactor 'count_uses_of_property' method in crop model
* Add check for nil column value
* Add @alran to CONTRIBUTORS.md
* Reformat Crop#count_uses_of_property
* Remove unnecessary string interpolation
2017-02-05 13:23:47 +13:00
Brenda Wallace
e5d826e8c3
Further simplified newsletter subscription logic
2017-02-04 11:28:37 +13:00
Brenda Wallace
77c01d4f66
BUGFIX: Added missing if
2017-02-04 11:23:27 +13:00
Brenda Wallace
ffee6ada83
Simplify member.update_newsletter_subscription
2017-02-04 11:18:00 +13:00
Brenda Wallace
19aa3a1ca4
PlantingsHelper simplification
2017-02-03 20:42:15 +13:00
Brenda Wallace
dfa23a6564
Simplified harvest.to_s
2017-02-01 23:55:45 +00:00
Shiny
7731623397
Merge branch 'dev' into likeable
2017-01-27 14:21:53 +13:00
Shiny
b80e7f677c
Merge branch 'dev' into likeable
2017-01-24 19:44:42 +13:00
Brenda Wallace
4fedc7f23f
Member can see crops they have requested
2017-01-23 09:49:47 +13:00
Brenda Wallace
370938c9f9
change deliver_later to deliver_now, so we don't sys.exit() crash
2017-01-22 21:22:30 +13:00
Brenda Wallace
ff50ec65d0
Merge remote-tracking branch 'upstream/dev' into HEAD
2017-01-22 18:26:29 +13:00
Shiny
ab332976da
Merge branch 'dev' into bw/rubocop
2017-01-15 17:36:17 +13:00
Brenda Wallace
39888d44e2
Rubocop compliance for the account model
2017-01-14 21:11:02 +13:00
Brenda Wallace
b603bae1a7
Rubocop compliance for the notification model
2017-01-14 21:09:47 +13:00
Brenda Wallace
05db5f3109
Rubocop compliance for the order_item model
2017-01-14 21:08:47 +13:00
Brenda Wallace
ad72ab0ba8
Rubocop compliance for the role model
2017-01-14 21:04:19 +13:00
Brenda Wallace
3beb3974fc
Rubocop compliance for the product model
2017-01-14 21:03:01 +13:00
Brenda Wallace
fa15fd2912
Rubocop compliance for the photo model
2017-01-14 21:01:46 +13:00
Brenda Wallace
78ed7869c5
Rubocop compliance for the member model
2017-01-14 20:57:18 +13:00
Brenda Wallace
0fa9f54c9c
Rename member.has_role? to role?
2017-01-14 20:54:43 +13:00
Brenda Wallace
f214f608ff
Rename member.is_paid? to paid?
2017-01-14 20:51:22 +13:00
Brenda Wallace
eb70f6dc57
Rubocop compliance for the seed model
2017-01-14 20:48:19 +13:00
Brenda Wallace
43c4b154f9
Rubocop compliance for the follow model
2017-01-14 20:45:54 +13:00
Brenda Wallace
832a20eac9
Rubocop compliance for order model
2017-01-14 20:42:32 +13:00
Brenda Wallace
f6cc0f3e13
rubocop compliance in post model
2017-01-14 20:34:08 +13:00
Brenda Wallace
5be5585084
Rubocop disable Rails/HasAndBelongsToMany
2017-01-14 20:31:34 +13:00
Brenda Wallace
989f176fb7
Crop model adhering to rubocop
2017-01-14 20:09:54 +13:00
Brenda Wallace
be07b5fd0e
Only check values.zero? if they are present
2017-01-14 20:09:09 +13:00
Brenda Wallace
d07509f9e4
Rubocop compliance for comment model
2017-01-14 17:23:39 +13:00
Brenda Wallace
0c1220d11f
Rubocop compliance for harvest model
2017-01-14 17:22:33 +13:00
Brenda Wallace
f889b112fe
Rubocop compliance for garden model
2017-01-14 17:20:21 +13:00
Brenda Wallace
eba397117c
Planting needs to calculate slugs before model is valid
2017-01-14 11:41:48 +13:00
Brenda Wallace
405dfe4bc9
Merge remote-tracking branch 'upstream/dev' into bw/description-photo-links
2017-01-08 21:35:59 +13:00
Brenda Wallace
062ff16acf
Put garden.to_s back to garden.name
2017-01-07 13:17:53 +13:00
Brenda Wallace
90b19d52bb
Don't rely on to_s for slug. Fragile with translations
2017-01-07 12:49:57 +13:00
Brenda Wallace
76be980163
Translate garden.location
2017-01-07 12:48:14 +13:00
Brenda Wallace
88b1f02574
Added require of photo model constants
2017-01-07 12:44:08 +13:00
Brenda Wallace
5319d23ee3
Using translations on links from photo page
2017-01-07 12:03:31 +13:00
Brenda Wallace
283bb76a9e
Link a harvest to a planting, and display
2017-01-04 22:45:49 +13:00
Shiny
ee7fbb9ab9
Merge branch 'dev' into bw/guard-clauses
2016-12-21 20:53:47 +13:00
Miles Gould
4b1cdc5650
Test Model.newsletter_(un)subscribe
...
I'm not very happy with this change as-is. The tests are very shallow
(they wouldn't have caught the bug @tconquest and I found in this code,
for instance), and use the deprecated `receive_message_chain` method.
From the RSpec docs:
"Chains can be arbitrarily long, which makes it quite painless to
violate the Law of Demeter in violent ways, so you should consider any
use of receive_message_chain a code smell. Even though not all code
smells indicate real problems (think fluent interfaces),
receive_message_chain still results in brittle examples. For example, if
you write allow(foo).to receive_message_chain(:bar, :baz => 37) in a
spec and then the implementation calls foo.baz.bar, the stub will not
work."
Further work needed.
2016-12-19 22:15:53 +00:00
Brenda Wallace
ca7868b79a
Use guard clauses
2016-12-14 21:28:35 +00:00
Daniel O'Connor
2594e5d334
Rubocop
2016-12-09 12:06:14 +10:30
Daniel O'Connor
fef272e30f
Merge remote-tracking branch 'upstream/dev' into likeable
2016-12-09 11:42:32 +10:30
Mackenzie
c760112e1b
Merge pull request #1118 from Br3nda/bw/assignment-in-condition
...
Don't use assignments in conditions
2016-12-06 12:40:00 -05:00
Brenda Wallace
a7bafafa06
Yet another wikipedia url char added to regex
2016-12-06 21:58:17 +13:00
Brenda Wallace
abc5ac5f29
Don't use assignments in conditions
2016-12-06 21:18:13 +13:00
Brenda Wallace
92195d51d2
Removed redundant returns
2016-12-04 21:21:35 +00:00