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
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
b82b4fa642
Comments controller has no show
2018-12-30 15:04:38 +13:00
Brenda Wallace
a6a7f789a3
Rubocop upgrade (and some style fixes)
2017-12-01 21:07:39 +13:00
Brenda Wallace
d5fece87d0
Tests for comments#index (and bugfix)
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
2da3cd6673
Fixed location to redirect to afver comment add/update
2017-05-29 16:17:43 +12:00
Brenda Wallace
3811417d70
More DRY comments controller
2017-05-29 16:17:43 +12:00
Brenda Wallace
9b3c77a0e6
More DRY comments controller
2017-05-29 16:17:43 +12:00
Brenda Wallace
ae398f1a63
Spec checks you can't change post id in comments#update
2017-02-17 09:20:15 +13:00
Brenda Wallace
cd3cee5d5f
DRY comments controller and add more spec scenarios
2017-02-17 09:14:01 +13:00
Brenda Wallace
4f465d808c
We don't need to load the resource again
2016-12-07 23:54:03 +00:00
Brenda Wallace
07c135eeb5
before_filter is now before_action
2016-11-26 17:20:13 +13:00
Brenda Wallace
bcdd2a9167
Changed called to rails dynamic find_by
2016-11-26 15:55: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
8648db5518
create SimpleShow concern for models where show's json call is simple
2016-05-25 13:37:01 -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
Taylor Griffin
36ac0b75e7
decoy commit to test if travis / phantomjs error was spurious
2015-01-15 22:23:27 +11: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
Skud
c109905cb0
fixed recent activity sorting for posts
2013-08-21 21:42:58 +10:00
Skud
a3b7822268
Review and cleanup of JSON API
...
Removed JSON from classes that shouldn't have it.
(PT: https://www.pivotaltracker.com/story/show/54570954 )
Also found a couple of controllers with broken authorization (i.e. not
checking CanCan). Incidentally, this also fixes the comment form bug at
https://www.pivotaltracker.com/story/show/54328716 .
2013-08-05 13:29:07 +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
c53dd6797f
Show other comments on post when editing a comment.
2013-04-29 21:44:30 +01: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
8caa4d12e8
limit to recent comments
2013-02-08 18:14:37 +11:00
Skud
b7f3634615
redirect to post after deleting comment
2013-02-08 17:37:37 +11:00
Skud
f45434ff83
redirect to post after new/edit comment
2013-02-08 16:40:27 +11:00
Skud
3b3f9d261f
can't create a new post without a post_id
2013-02-08 15:02:21 +11:00
Skud
b6c759e521
edit comments
2013-02-08 14:49:07 +11:00
Skud
ae59b1e18d
pass post_id through to comment
2013-02-08 14:37:57 +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