25 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
2db3d1bacc Various corrections 2022-11-08 00:21:23 +10:30
Awesome Code
4cbe6ca244 Auto corrected by following Lint Ruby RSpec/DescribedClass 2020-03-03 22:33:13 +00:00
Brenda
7257b2ada1 Update with frozen literals 2020-01-10 16:50:52 +13:00
Brenda Wallace
756cf1fe3a Removing unused code in specs 2019-08-18 14:51:24 +12:00
Awesome Code
490db7b342 Auto corrected by following Lint Ruby RSpec/HookArgument 2019-02-11 09:00:34 +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
3cc637017d Avoid {} for multiline 2017-12-06 14:29:21 +13:00
Brenda Wallace
6aa689b0d8 Removed some model ordering specs 2017-11-29 20:59:37 +13:00
Logan Gingerich
10a8df47a9 Factorygirl to factorybot - fixes #1413 (#1425)
* FactoryGirl Changed to FactoryBot

file fix

changes based on comments received

Bundle Update on 2017-10-29

style update to align hash literal

added package-lock

* indentation fixes with rubocop

* name added to contributors
2017-11-01 15:03:31 +00:00
Brenda Wallace
78aa049502 Fixed comment model spec 2017-10-23 10:44:37 +01:00
Brenda Wallace
97c7277a73 fixed up ambigous regex and use of expect in specs 2017-10-23 10:44:37 +01:00
Brenda Wallace
62e7c716dd Removed extra empty blank lines 2016-11-26 12:06:02 +13:00
Brenda Wallace
bdb057ca0f Removed all trailing white space 2016-11-14 15:05:32 +13: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
Cjay
c568498941 Refactor spec/models
- Changed before(:each) into let
- Changed :admin_ability and :cw_ability into :ability
2015-07-09 02:21:10 +08:00
Taylor Griffin
7fc886f43c implement custom Sweeper class as stop gap against errors when running specs 2014-11-16 12:01:27 +11:00
Skud
e17dcf8671 Reordered comments: they are now DESC by default
Added scope "post_order" to order them ASC for display on post page.
Also tweaked post/comment views a bit.
2013-05-24 14:36:58 +10:00
Skud
adaee1c9ab don't send notifications to yourself 2013-02-22 17:27:40 +11:00
Skud
af9c1591ef added inbox link and count to nav 2013-02-22 17:20:25 +11:00
Skud
cdee808933 prettified notifications inbox etc 2013-02-16 01:22:19 +11:00
Skud
4516a2f099 comments now generate notifications 2013-02-16 00:18:49 +11:00
gnattery
6da3e4fae5 Added associations and tested them 2013-02-06 15:20:44 +11:00
gnattery
3cff543184 rails g scaffold Comment 2013-02-06 14:49:49 +11:00