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
d1f754a288
Rubocop
2022-11-08 00:23:38 +10:30
Daniel O'Connor
b24b9f82e6
Rubocop - auto corrections
2022-11-06 16:34:36 +10:30
Brenda Wallace
bcc722d0c2
Updating content type in tests to include charset
2020-08-26 12:36:58 +12:00
Brenda
7257b2ada1
Update with frozen literals
2020-01-10 16:50:52 +13:00
Brenda Wallace
8faa712e07
be_success -> be_successfull
...
fixes a deprecation warning
2019-06-27 22:26:15 +12:00
Awesome Code
ad470ede1d
Auto corrected by following Lint Ruby RSpec/AlignRightLetBrace
2019-03-13 17:23:33 +13:00
Awesome Code
3bc1bba448
Auto corrected by following Lint Ruby RSpecEmptyLine
2019-03-12 22:51:12 +00:00
Awesome Code
f90cc792bb
Auto corrected by following Lint Ruby RSpec/AlignLeftLetBrace
2019-03-13 11:42:27 +13:00
Awesome Code
3efc0caaf7
Auto corrected by following Lint Ruby EmptyLine
2019-02-11 11:02:33 +13:00
Awesome Code
490db7b342
Auto corrected by following Lint Ruby RSpec/HookArgument
2019-02-11 09:00:34 +13:00
Awesome Code
49eed9b208
Auto corrected by following Lint Ruby RSpec/LetBeforeExamples
2019-02-10 09:24:00 +00:00
Awesome Code
284bb81bbf
Auto corrected by following Lint Ruby RSpecEmptyLine
2019-02-09 03:05:40 +00:00
Brenda Wallace
d5676338d6
Use the expect syntax
2018-12-30 15:06:14 +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
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
Awesome Code
dea7ce241b
Auto corrected by following RSpec/EmptyLineAfterFinalLet
2018-01-23 09:00:34 +13:00
Brenda Wallace
8e0b7d9ded
Merge branch 'charts' into upgrade/rails-5
...
Conflicts:
app/assets/javascripts/crops.js.erb
spec/controllers/comments_controller_spec.rb
spec/controllers/harvests_controller_spec.rb
spec/controllers/photos_controller_spec.rb
spec/controllers/plantings_controller_spec.rb
spec/models/post_spec.rb
spec/views/home/_crops.html.haml_spec.rb
2018-01-11 08:34:20 +13:00
Awesome Code
e46f530dc3
Auto corrected by following RSpec/EmptyLineAfterFinalLet
2018-01-09 02:00:40 +00:00
Brenda Wallace
2f9610a60f
Http positional arguments in rails 5
2018-01-04 21:28:48 +13:00
Brenda Wallace
d5fece87d0
Tests for comments#index (and bugfix)
2017-11-29 20:59:37 +13:00
milesgould
d8bf8ae4df
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-17 16:51:24 +00: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
d15eb32133
Added some utf8, kōrero mai (te reo māori)
2017-02-17 09:47:12 +13: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
40a981c94d
Removed unnecesary braces on hash args
2017-01-22 15:10:11 +13:00
Brenda Wallace
723ebff923
Spacing fixes
2016-11-26 12:13:17 +13: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
Taylor Griffin
95974ab21b
add deprecation not to all controller and view specs
2015-02-12 19:52:53 +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
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
923f01cd72
cleaned up boring controller tests
2013-07-08 13:24:26 +10:00
Skud
0508837303
Can't assume we have a member with id = 1
...
this works on sqlite but not on postgres (which we now test on, on
travis)
2013-07-08 12:00: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
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
ae59b1e18d
pass post_id through to comment
2013-02-08 14:37:57 +11:00
gnattery
3cff543184
rails g scaffold Comment
2013-02-06 14:49:49 +11:00