33 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
fb86448061 HAML 6 (#3607)
* HAML

* rewrite

* Fix specs - but likely still wrong

* Return temple

* Trailing line

* Fix specs

* This was rearranged, apparently.

* Fix tests

* Retain escaping

* Fix specs

* Rubocop

* Apparently the escaped filter doesn't work with interpolation. Swap to our implementation
2024-02-03 17:33:39 +10:30
Brenda
7257b2ada1 Update with frozen literals 2020-01-10 16:50:52 +13:00
Brenda Wallace
3e0f6c476f set body on post in spec, so we know what to look for
and we don't trip on whitespace changes
2019-06-25 09:01:37 +12:00
Brenda Wallace
cafc514ee5 spec updates 2019-06-24 18:06:32 +12:00
Brenda Wallace
82661c577c Removing comments views 2019-06-13 21:05:29 +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
milesgould
bb6e9e32e6 De-deprecate controller and view specs
We deprecated controller and view specs on the grounds that they were
brittle, and were a poorer measure of user experience than feature
specs. However, feature specs have their own problems: they're much
slower to run, and flakier (see #901). We also ran into a few cases
where feature specs erroneously passed because they were checking for
the presence of a string that occurred in the error page!

Hence, we're cautiously un-deprecating controller and view specs.

Fixes #1132
2017-11-24 19:02:54 +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
62e7c716dd Removed extra empty blank lines 2016-11-26 12:06:02 +13:00
Brenda Wallace
bbc19a5436 Array indentation fixed 2016-11-26 11:49:51 +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
Taylor Griffin
95974ab21b add deprecation not to all controller and view specs 2015-02-12 19:52:53 +11:00
Taylor Griffin
cc31e864d5 update webrat and webrat matchers 2014-11-16 14:31:33 +11: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
2c8f0687e5 Added posts and comments RSS links 2013-10-23 12:06:04 +11:00
Skud
18b92b133b Added titles to comment items in RSS 2013-05-24 14:43:45 +10: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
0d3588535e Added RSS feed for all comments 2013-05-24 13:29:17 +10:00
Skud
57f8575ab9 removed unwanted @recent_comments, replaced w pagination 2013-05-24 12:54:57 +10:00
Miles Gould
2b84fa8bad Show previous comments when creating a comment.
- Move "show previous comments" into a partial
 - invoke said partial from the new comment form
 - add tests.
2013-04-29 21:30:26 +01:00
Skud
17309723d5 show markdown help on post and comment pages 2013-03-20 22:08:09 +11:00
Miles Gould
ade199c17b Better links for posts.
- add Permalink
 - show Reply instead of "Comment" (iff you can comment)
 - Edit link shows if you have permission to edit
 - reorganised tests for post/_single
 - posts/_single now requires current_user; patch tests for comments.
2013-02-27 12:53:50 +00:00
Skud
8caa4d12e8 limit to recent comments 2013-02-08 18:14:37 +11:00
Skud
979ad334f3 made the index page not be ugly 2013-02-08 17:31:17 +11:00
Skud
801347976e Added edit/delete buttons to comment display 2013-02-08 17:24:06 +11:00
Skud
62af897bf1 various prettification 2013-02-08 16:55:55 +11:00
Skud
acc1f4006f fixed tests to reflect removed fields 2013-02-08 16:13:52 +11:00
Skud
a0a88bee11 comment form shouldn't have author/post fields 2013-02-08 14:14:07 +11:00
gnattery
3cff543184 rails g scaffold Comment 2013-02-06 14:49:49 +11:00