Commit Graph

41 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
Brenda
7257b2ada1 Update with frozen literals 2020-01-10 16:50:52 +13:00
Brenda Wallace
c173d359d8 Split up giant member model 2019-08-12 10:00:21 +12:00
Brenda Wallace
df87a79ab6 Only send email if user wants them 2019-08-12 09:40:53 +12:00
Brenda Wallace
e01b53fd9b Remove extra validators on notification
We are migrating away from here
2019-08-11 15:52:11 +12:00
Brenda Wallace
4f74b20565 Migrate from notifications to conversations without sending emails 2019-08-11 14:17:30 +12:00
Brenda Wallace
2a3563f9fd Migration from notifications to mailboxer 2019-08-11 13:37:56 +12:00
Brenda Wallace
083d7c09e6 Migration of notifications to mailboxer, without sending new emails 2019-08-10 17:30:24 +12:00
Brenda Wallace
b3807100d1 fixes email sending 2019-08-10 11:47:45 +12:00
Brenda Wallace
d91a5bf55f Rewriting messages functionality to use mail boxer 2019-07-20 19:43:29 +12:00
Brenda Wallace
339b3fd57e Moving to conversations and messages instead of notifications 2019-07-20 13:21:05 +12:00
Brenda Wallace
fc0a941fb6 Adding more inverse relationships 2018-10-16 11:32:03 +13:00
Brenda Wallace
62fd16e6b2 Notifications don't have a post if they are a message 2018-01-06 09:01:18 +13:00
Brenda Wallace
b6c9b13d4d Models inherit from application record 2018-01-03 17:16:14 +13:00
Brenda Wallace
7719d1f896 Remote default ordering scopes, and clean up models 2017-11-29 20:59:37 +13:00
Brenda Wallace
370938c9f9 change deliver_later to deliver_now, so we don't sys.exit() crash 2017-01-22 21:22:30 +13:00
Brenda Wallace
b603bae1a7 Rubocop compliance for the notification model 2017-01-14 21:09:47 +13:00
Brenda Wallace
ca7868b79a Use guard clauses 2016-12-14 21:28:35 +00:00
Mackenzie Morgan
99c8db72d6 syntax 2016-11-29 12:14:16 -05:00
Mackenzie Morgan
9dc02cd3d8 make changes from code review 2016-11-29 12:10:48 -05:00
Mackenzie Morgan
c93fd78aa8 Merge branch 'dev' of gitmaco:Growstuff/growstuff into scopify 2016-11-29 09:58:02 -05:00
Brenda Wallace
62e7c716dd Removed extra empty blank lines 2016-11-26 12:06:02 +13:00
Mackenzie Morgan
494790bcd4 moving where clauses into scopes to keep that contained in models 2016-10-11 15:28:08 -04:00
Daniel O'Connor
5d70d822eb #951 Swap to deliver_later implementation 2016-08-16 10:55:40 +09:30
Daniel O'Connor
7fe75ee52a Fix DEPRECATION WARNING: #deliver is deprecated. 2016-06-10 15:45:01 +09:30
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
Daniel O'Connor
de8bcc38d3 #857 Add length validations to models 2016-04-03 00:13:38 +10:30
Cjay Billones
bb88041fef [Refactoring] Replace .count and .length with .size for collections
Improved program efficiency (in querying in particular) by replacing .count and .length with .size for collections.

Fix error in refactoring

Reverted some .size into .count
2015-06-25 12:09:03 +08:00
Taylor Griffin
acbd3f9a9e implement strong parameters instead of protected attributes 2014-11-18 20:08:54 +11:00
Taylor Griffin
70185156aa use lambda instead of just relation in names scope 2014-11-16 12:11:56 +11:00
Taylor Griffin
40a88b5b09 tests run but fail like whoa 2014-11-15 21:44:55 +11:00
Miles Gould
aab0a438fd Replace blank/nil notification subjects with (no subject) 2013-04-30 12:39:03 +01:00
gnattery
2ecd996e8a Merge branch 'dev' of github.com:phazel/growstuff into private_message 2013-04-01 13:42:09 +11:00
Miles Gould
91acf9f878 Only send email notifications to members who want them. 2013-03-27 12:17:46 +00:00
Miles Gould
64b957db20 Actually send email on creating notifications. 2013-03-27 11:58:05 +00:00
gnattery
ac7b48406b Members can send each other private messages.
Problems:
Notifications controller test fails on redirecting, but seems to work fine in practice
Send Message button doesn't look nice on page
2013-03-25 17:52:50 +11:00
Skud
af9c1591ef added inbox link and count to nav 2013-02-22 17:20:25 +11:00
Skud
528a5ce32c changed to/from to recipient/sender 2013-02-16 00:28:31 +11:00
Skud
a2cfd44de4 Removed "notification type" since WAGNI (yet)
We figured that doing without it was more like the simplest thing that
could possibly work.

Note that we edited the migration in place after rolling back.  This
would cause problems if anyone had downloaded the code from pozorvlak's
repo the other day and run it, but we're assuming they didn't (since
they wouldn't have got anything interesting out of it anyway.)
2013-02-15 23:58:27 +11:00
Skud
cc2c63b2eb added cancan abilities for reading notifications 2013-02-15 23:17:52 +11:00
Miles Gould
42d9034fc6 rails g scaffold notifications. 2013-02-12 13:17:14 +00:00