109 Commits

Author SHA1 Message Date
google-labs-jules[bot]
8564ec7a7c Add comments to photos (#4130)
* Add comments to photos

Extend the photo show page to support comments by logged in users.

- Make the Comment model polymorphic.
- Update the Photo and Post models to have comments.
- Update the comments controller to handle the polymorphic association.
- Update the photo show page to display comments and a comment form.
- Create a reusable comments partial.

* Add migration

* Fix tests

* Fix tests

* Slightly fix tests

* Fix variables

* Add field

* Refactor slightly

* Refactor slightly

* Refactor slightly

* Refactor

* Photos respond to this as well

* Refactor to polymorphic_url

* Rename

* Wrong relationship

* Refactor and fix tests

* Fix relationships

* Fix rendering

* Fix tests

* Fix model tests

* Fix test

* Fix test

* Fix test

* Fix test

* Fix controller spec

* Fix view tests

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
2025-08-24 21:10:16 +09:30
Daniel O'Connor
a7a5b6ef17 Remove required text UI element 2024-10-13 11:56:56 +00:00
Daniel O'Connor
81060cccf7 Ruby 3.2: Rubocop - Lint/* and Style/* (#3786)
* Rubocop - Layout/*
* Rubocop - Lint and Style
2024-07-13 15:38:37 +09:30
Daniel O'Connor
d1f754a288 Rubocop 2022-11-08 00:23:38 +10:30
Daniel O'Connor
2db3d1bacc Various corrections 2022-11-08 00:21:23 +10:30
Daniel O'Connor
e2942f17c7 Rubocop corrections 2022-11-08 00:18:35 +10:30
Daniel O'Connor
b24b9f82e6 Rubocop - auto corrections 2022-11-06 16:34:36 +10:30
codefactor-io
4ff95fbac9 [CodeFactor] Apply fixes 2020-01-21 22:26:08 +13:00
Brenda
7257b2ada1 Update with frozen literals 2020-01-10 16:50:52 +13:00
Brenda Wallace
04fd1a343a Rubocop update (#2334)
* Update rubocop config

* Rubocop update - for rubocop 0.77

* [CodeFactor] Apply fixes

* rubocop fixes

* [CodeFactor] Apply fixes to commit 2826c2e
2019-12-16 22:35:33 +13:00
Brenda Wallace
b2e90cddc6 Merge branch 'dev' into weeks 2019-10-25 13:41:30 +13:00
André Aubin
279d85456b Switching gravatar urls to secure subdomain 2019-10-24 23:51:52 +00:00
André Aubin
66045866b3 Switch to HTTPS for Gravatar urls 2019-10-24 23:51:52 +00:00
Brenda Wallace
d96b30fff8 spec for in_weeks method 2019-10-24 21:06:28 +13:00
Brenda Wallace
7b5698f977 👩‍🌾 Import openfarm data (#2177)
* Pull in openfarm icons, photos, info
* Truncating member location
* tidying up harvest display, and reducing duplication in css styles
* Tiny crop chip
* only show crop charts if there is data to show
* Make the styles more Growstuff
* Fixed links to openfarm
* Updating specs to cope with new photo sources
fix broken garden timeline on some pages
* Update homepage blurb
* Import crop companions
* More fluid page
* use thumbnail unless the source is flickr
* Messing with homepage
* Added crop growing_degree_days
* expect full size url on photos helper spec
* formatted dates from seeds#show
* tidy up places#show
* Move progress bar
* Quicker buttons for approve/reject crops
* Remove kaminari gem
* use crop cards on hierarchy page
* more crops on crops#index
* Wrap photo creation in transaction
* Wrap crop companions in a transaction
2019-09-28 17:23:25 +12:00
Brenda Wallace
12c1002dc6 Removing unused notifications code 2019-08-08 09:31:53 +12:00
Brenda Wallace
253c0cb939 Merge branch 'dev' into following-page 2019-07-08 16:44:03 +12:00
Brenda Wallace
e7cfe0b5c4 Update spec to look for placeholder_600 2019-07-08 04:43:03 +00:00
Brenda Wallace
4acf165f24 specs for event_helper 2019-07-08 12:44:26 +12:00
Brenda Wallace
3859122fa5 tidy 2019-07-08 10:04:08 +12:00
Brenda Wallace
def468827c Update helper spec 2019-06-14 11:21:23 +12:00
Brenda Wallace
3371353db8 Revert spec
less to update
2019-04-20 19:57:45 +12:00
Brenda Wallace
33460bb171 Update spec 2019-04-20 15:09:24 +12:00
Daniel O'Connor
8a14a7bc0d Merge branch 'dev' into plantings-show 2019-04-18 17:33:30 +09:30
Awesome Code
8b0ecd568e Auto corrected by following Lint Ruby RSpec/ImplicitSubject 2019-04-17 10:37:30 +12:00
Brenda Wallace
830b554dc9 Test updates 2019-03-29 11:28:17 +13:00
Brenda Wallace
e4d4cdc3fa Fix up seed description helper 2019-03-29 10:45:51 +13:00
Awesome Code
ad470ede1d Auto corrected by following Lint Ruby RSpec/AlignRightLetBrace 2019-03-13 17:23:33 +13:00
Awesome Code
f90cc792bb Auto corrected by following Lint Ruby RSpec/AlignLeftLetBrace 2019-03-13 11:42:27 +13:00
Awesome Code
689baa85a3 Auto corrected by following Lint Ruby RSpec/ExampleWording 2019-02-11 10:17:54 +13:00
Awesome Code
29ee362bfa Auto corrected by following Lint Ruby Space 2019-02-11 09:28:43 +13:00
Awesome Code
490db7b342 Auto corrected by following Lint Ruby RSpec/HookArgument 2019-02-11 09:00:34 +13:00
Awesome Code
54798190a7 Auto corrected by following Lint Ruby RSpec/ReturnFromStub 2019-02-10 09:24:07 +00:00
Awesome Code
284bb81bbf Auto corrected by following Lint Ruby RSpecEmptyLine 2019-02-09 03:05:40 +00:00
Brenda Wallace
986bca44f7 Merge remote-tracking branch 'upstream/dev' into routes-tidy-up
Conflicts:
	app/views/layouts/_header.html.haml
	spec/features/gardens/actions_spec.rb
2019-01-24 13:48:36 +13:00
Brenda Wallace
a6ac57f045 Tests for edit and add photo buttons 2019-01-24 12:17:40 +13:00
Brenda Wallace
90386221bc Update notification reply url in helper spec 2019-01-06 08:45:42 +13:00
Brenda Wallace
f8921d3ded Update reply notifications 2019-01-06 08:45:42 +13:00
Brenda Wallace
7b01fcbd4b Align all the hashes 2018-12-30 15:22:29 +13:00
Brenda Wallace
550860178e Merge remote-tracking branch 'upstream/dev' into upgrade/rails-5 2018-09-11 16:07:30 +12:00
Awesome Code
90f4db4853 Auto corrected by following Ruby rspec layout 2018-09-10 22:20:12 +00:00
Brenda Wallace
a590b89302 Photos in spec needs to have same owner as item they link to 2018-06-04 15:29:59 +12:00
Brenda Wallace
152cdace75 Removed spec for currency helpers 2018-05-01 13:47:25 +12:00
Brenda Wallace
4e6ffc1a63 Removed spec for currency helpers 2018-04-28 22:21:35 +12:00
Brenda Wallace
fa32537c3b Merge remote-tracking branch 'upstream/dev' into upgrade/rails-5
Conflicts:
	.rubocop_todo.yml
	Gemfile.lock
	app/assets/javascripts/application.js
	app/assets/javascripts/members.js.erb
	app/assets/stylesheets/predictions.sass
	app/controllers/crops_controller.rb
	app/controllers/orders_controller.rb
	app/controllers/plantings_controller.rb
	app/models/account.rb
	app/models/account_type.rb
	app/models/member.rb
	app/models/order.rb
	app/models/order_item.rb
	app/models/product.rb
	app/views/gardens/show.html.haml
	app/views/layouts/application.html.haml
	config/initializers/assets.rb
	config/routes.rb
	db/schema.rb
	package-lock.json
	spec/controllers/account_types_controller_spec.rb
	spec/controllers/admin/orders_controller_spec.rb
	spec/controllers/comments_controller_spec.rb
	spec/controllers/gardens_controller_spec.rb
	spec/controllers/harvests_controller_spec.rb
	spec/controllers/member_controller_spec.rb
	spec/controllers/order_items_controller_spec.rb
	spec/controllers/orders_controller_spec.rb
	spec/controllers/photo_associations_controller_spec.rb
	spec/controllers/photos_controller_spec.rb
	spec/controllers/plantings_controller_spec.rb
	spec/controllers/seeds_controller_spec.rb
	spec/controllers/shop_controller_spec.rb
	spec/features/crops/crop_detail_page_spec.rb
	spec/models/member_spec.rb
	spec/models/post_spec.rb
	spec/views/crops/_planting_advice.html.haml_spec.rb
	spec/views/home/_crops.html.haml_spec.rb
	spec/views/orders/show.html.haml_spec.rb
	spec/views/posts/show.html.haml_spec.rb
	spec/views/shop/index_spec.rb
2018-04-02 10:59:13 +12:00
Brenda Wallace
ece7113c89 DRY photo helper spec 2018-03-15 22:56:32 +13:00
Brenda Wallace
8941c577e4 Specs for photos helper 2018-03-14 22:25:30 +13:00
Brenda Wallace
65b4c7dbc1 Revert "Auto corrected by following Style/StringLiterals"
This reverts commit ab56a3c6b3.
2018-02-09 07:58:47 +13:00
Awesome Code
ab56a3c6b3 Auto corrected by following Style/StringLiterals 2018-02-07 10:20:26 +13:00
Brenda Wallace
f4af682d45 Updated code for Rail 5 2018-01-03 17:12:17 +13:00