Commit Graph

75 Commits

Author SHA1 Message Date
Brenda Wallace
14551b6ec8 Merge remote-tracking branch 'upstream/dev' into feature/photos-1457
Conflicts:
	spec/models/crop_spec.rb
2017-12-09 20:59:20 +13:00
Brenda Wallace
a6a7f789a3 Rubocop upgrade (and some style fixes) 2017-12-01 21:07:39 +13:00
Brenda Wallace
697779e67c Don't add item to photo is already there 2017-11-30 10:15:05 +13:00
Brenda Wallace
ff57176d60 Simplified the photos controller a bit 2017-11-29 22:13:03 +13:00
Brenda Wallace
594e466fd4 Fixed photos ordering 2017-11-29 20:59:37 +13:00
Brenda Wallace
0446c0a405 Add ordering back into controller #index 2017-11-29 20:59:37 +13:00
Brenda Wallace
229396d9e7 Add id and type back to photos#new 2017-11-22 22:06:41 +13:00
Brenda Wallace
7906d50d13 Shaved some yaks to remove a rescue from a controller 2017-11-18 22:25:58 +13:00
Brenda Wallace
faed8b019e Removed rescue in a controller 2017-11-18 22:25:58 +13:00
Brenda Wallace
c8974a869f Use the ||= operator 2017-11-18 22:25:58 +13:00
Brenda Wallace
3969f410f1 Tidy up photos logic, and test of signin/out on photos#new 2017-11-18 22:25:58 +13:00
Logan Gingerich
6304f230a5 Refactored and specs updated 2017-11-18 22:25:58 +13:00
Logan Gingerich
73524b8883 Now displays correctly for planting, harvest or garden 2017-11-18 22:25:58 +13:00
Logan Gingerich
fd9fc38def fixes #1433 Says what item you're adding a photo to on photos#new 2017-11-18 22:25:58 +13:00
Brenda Wallace
f3e88f5aae Include harvest photos on crop page 2017-10-24 09:34:10 +13:00
Brenda Wallace
1e81dac699 All crop photos; crops-> photos route 2017-10-24 09:34:03 +13:00
Brenda Wallace
9f9df07390 DRY photos controller more 2017-05-29 16:17:43 +12:00
Brenda Wallace
5d654175a9 A bunch of single line methods 2017-05-29 16:17:43 +12:00
Brenda Wallace
882d641683 Photo changes expire homepage too 2017-03-03 08:49:24 +13:00
Brenda Wallace
ce03b4efde DRY the photos controller 2017-02-26 17:03:29 +13:00
Brenda Wallace
4f465d808c We don't need to load the resource again 2016-12-07 23:54:03 +00:00
Mackenzie Morgan
7b2be73c88 code climate 2016-12-01 00:22:52 -05:00
Mackenzie Morgan
31bbf42ad0 define valid models for photos in a constants file
remove all hardcoded model names from photo.rb and photos_controller.rb
2016-12-01 00:19:33 -05:00
Brenda Wallace
c878baa886 Indented parameters cleanup 2016-11-26 11:41:07 +13:00
Brenda Wallace
fb6f1ac0a8 Changed whitelisting of what can have photos 2016-11-21 10:05:52 +13:00
Brenda Wallace
069343803e List of types that can have photos in own method 2016-11-20 21:46:58 +13:00
Brenda Wallace
8012d9f6a8 Whitelist which items can have photos 2016-11-20 21:02:43 +13:00
Brenda Wallace
73a050df13 before_filter becomes before_action
in photos controller
2016-11-20 20:29:45 +13:00
Brenda Wallace
138080c4d4 Tabulation fix 2016-11-20 20:18:20 +13:00
Brenda Wallace
cf70bfebe9 Further simplified photos controller 2016-11-20 20:17:27 +13:00
Brenda Wallace
f4a26d0580 has_item_id? renamed to item_id? 2016-11-20 09:06:04 +13:00
Brenda Wallace
0a54c2d986 Moved to method: collection to use for photos 2016-11-20 09:05:29 +13:00
Brenda Wallace
9c4f011fbc Reduced percieved complexity in photos_controller.rb 2016-11-19 22:28:38 +13:00
Brenda Wallace
bdb057ca0f Removed all trailing white space 2016-11-14 15:05:32 +13:00
pozorvlak
e6209a5906 Remove "show" methods that just do the default
We can just fall back to the default implementation for these.
2016-06-08 15:58:45 +01:00
pozorvlak
a8961c3466 Revert "Show concern" 2016-06-08 12:58:32 +01:00
Mackenzie Morgan
ed468e79fc Merge branch 'dev' of gitmaco:Growstuff/growstuff into show_concern 2016-06-07 09:57:47 -04:00
Mackenzie Morgan
8c2aa4844f use CW's case statement idea 2016-05-25 15:15:09 -04:00
Mackenzie Morgan
8648db5518 create SimpleShow concern for models where show's json call is simple 2016-05-25 13:37:01 -04:00
Mackenzie Morgan
b601fe40b3 refactor photo controller create for readability 2016-05-24 16:59:52 -04:00
Daniel O'Connor
4b4e0cf69a $ rubocop --only HashSyntax --auto-correct
483 files inspected, 2018 offenses detected, 2018 offenses corrected
2016-05-19 15:53:11 -04:00
Vincent Wong
60df62f3fa added flash message when deleting messages 2015-06-06 14:36:03 +10:00
Mackenzie Morgan
c38dc4661d basics of garden photos 2015-01-27 00:54:05 -05:00
Taylor Griffin
007f7112a7 replaced caching using observers with a key-based (and simplified) caching system 2014-12-19 21:17:43 +11:00
Taylor Griffin
a35a573b2b update follow member code to be rails 4 compatible 2014-12-14 14:51:18 +11:00
Yoong Kang Lim
837121265a Reversed order of authorization and authentication. Also added tests 2014-12-09 21:27:16 +11:00
Yoong Kang Lim
81d1189203 Added a before_filter for any action that requires authentication. Will redirect to login page if not logged in 2014-11-24 22:12:42 +11:00
Taylor Griffin
acbd3f9a9e implement strong parameters instead of protected attributes 2014-11-18 20:08:54 +11:00
Mackenzie Morgan
48ad561b76 convert tabs to spaces 2014-10-01 23:58:54 -04:00
Mackenzie Morgan
fcda8742d8 go back to the nested error handling in the photos controller and add a migration for indexing harvests_photos 2014-10-01 22:52:52 -04:00