docbrown/app/services
Jeremy Friesen 9df5f6af49
Ensuring reading list excludes unpublished articles (#15490)
* Ensuring reading list excludes unpublished articles

Prior to this commit, if a given user adds an article to their reading
list then the author unpublishes the article, the article remains in the
reading list.  When the given user would then "click" on the now
unpublished article, they would get a 404 Not Found notice.

With this commit, we now exclude unpublished articles from the search
results for the reading list.

This should also address the issue of attempting to archive the reading
list item (because it won't be visible in the listing).

One of the behaviors that is expected is if, in the above scenario, the
author again publishes the article, that article will again "appear" on
the reading list for the given user.

Closes #14796

* Updating documentation and adding spec

* Addressing pull request feedback

Yes, I should've used a scope!  And also, no need to test present.  Just
let it's "truthy"-ness speak for itself!

* Update spec/services/search/reading_list_spec.rb

Co-authored-by: Jamie Gaskins <jamie@forem.com>

Co-authored-by: Jamie Gaskins <jamie@forem.com>
2021-11-24 13:22:26 -05:00
..
articles Parameterizing featured story requiring main image (#15333) 2021-11-18 16:28:58 -05:00
audit Rubocop fixes (#11862) 2020-12-11 17:36:42 +03:00
authentication Guarding against spam from OAuth Sources (#15404) 2021-11-18 16:26:39 -05:00
badges Skip badge awards for spam accounts (#15344) 2021-11-10 10:48:01 -06:00
broadcasts/welcome_notification Bump rubocop-performance from 1.10.2 to 1.11.0 (#13471) 2021-04-22 09:31:25 -05:00
color Remove redundant freeze calls (#14596) 2021-08-26 10:01:08 -04:00
credits Fix app/services' ruby 2.7 kwargs warnings (#13177) 2021-04-01 18:40:50 -04:00
discover Add Forem Discover registration worker and service (#14865) 2021-10-01 10:27:31 -04:00
edge_cache ✂✂✂ Remove events (#15062) 2021-10-15 09:31:08 -04:00
error_messages Remove redundant freeze calls (#14596) 2021-08-26 10:01:08 -04:00
exporter Fix app/services' ruby 2.7 kwargs warnings (#13177) 2021-04-01 18:40:50 -04:00
fastly_config Abstract DatadogStatsClient to ForemStatsClient (#12304) 2021-01-27 11:25:44 -05:00
feeds Use new UserSetting and UserNotificationSettings and Ignore Related User Table Fields (#14121) 2021-07-08 09:31:34 -05:00
follows Fix UI showing "Following" after unfollowing a user (#13757) 2021-05-19 17:40:38 +01:00
giphy Deduplicate giphy_img? function and add tests (#4590) 2019-10-30 11:40:17 -04:00
github Split Settings::Authentication from SiteConfig (#13095) 2021-04-12 09:41:09 +02:00
homepage [Search 2.0] Add query filters for profile, organization and tag index pages (#13510) 2021-04-27 08:49:47 +02:00
html Asynchronously detect image aspect ratios and apply proper attributes (#15170) 2021-10-26 13:39:25 -07:00
images Fix rotation of images uploaded from iPhones (#15010) 2021-10-11 15:17:14 -04:00
loggers Abstract DatadogStatsClient to ForemStatsClient (#12304) 2021-01-27 11:25:44 -05:00
mailchimp Handle GibbonError when Mailchimp api key was not set (#14695) 2021-09-13 10:30:35 -05:00
markdown_processor Remove redundant freeze calls (#14596) 2021-08-26 10:01:08 -04:00
mentions Issue #9077 has already been resolved, added specs (#15342) 2021-11-17 11:27:50 +02:00
moderator ✂✂✂ Remove Connect (#14734) 2021-11-18 08:21:00 -06:00
notification_subscriptions Add Article post_commit when user_id changes with specs (#15132) 2021-10-25 10:53:21 +07:00
notifications views/notifications i18n (#15056) 2021-10-25 15:46:46 +07:00
organizations Organizations delete optimizations and refactoring (#13610) 2021-05-11 12:14:55 +03:00
payments Refactor credit purchasing (#13955) 2021-06-15 09:04:51 +07:00
podcasts views/podcasts, views/podcast_episodes i18n (#15020) 2021-10-25 14:32:51 +01:00
profile_fields Refactor profile refreshing (#14643) 2021-09-13 12:15:04 -04:00
push_notifications Have specs run without Redis and refactor ConsumerApp and Device (#13647) 2021-05-07 08:03:16 +02:00
re_captcha Rename SiteConfig to Settings::General (#13573) 2021-05-21 14:45:37 +02:00
search Ensuring reading list excludes unpublished articles (#15490) 2021-11-24 13:22:26 -05:00
secrets Use a sortable unique ID for the event_id (#3972) 2019-09-09 10:15:12 -04:00
settings Disable all providers when providers_to_enable param is blank (#15260) 2021-11-02 21:20:26 -04:00
slack Rename SiteConfig to Settings::General (#13573) 2021-05-21 14:45:37 +02:00
spam Refactoring and extending article spam behavior (#15399) 2021-11-17 17:09:17 -05:00
tag_moderators ✂✂✂ Remove Connect (#14734) 2021-11-18 08:21:00 -06:00
twitter_client Split Settings::Authentication from SiteConfig (#13095) 2021-04-12 09:41:09 +02:00
user_subscriptions Fix typo in create_from_controller_params.rb (#15171) 2021-10-25 10:42:40 -07:00
users ✂✂✂ Remove Connect (#14734) 2021-11-18 08:21:00 -06:00
webhook Fix app/services' ruby 2.7 kwargs warnings (#13177) 2021-04-01 18:40:50 -04:00
analytics_service.rb Add counts for number of views when showing referrers (#14600) 2021-08-27 08:03:43 -05:00
application_service.rb [deploy] Refactor 🚀 : Replaced Chat Channel Setting page with Preact component. (#8271) 2020-06-10 16:58:37 -04:00
article_api_index_service.rb Profile generalization cleanup phase 2 (#14555) 2021-08-27 09:17:26 +07:00
article_with_video_creation_service.rb Use new UserSetting and UserNotificationSettings and Ignore Related User Table Fields (#14121) 2021-07-08 09:31:34 -05:00
bulk_sql_delete.rb Remove txn from with_statement_timeout block (#15088) 2021-10-15 14:53:35 -04:00
email_digest.rb Use new UserSetting and UserNotificationSettings and Ignore Related User Table Fields (#14121) 2021-07-08 09:31:34 -05:00
email_digest_article_collector.rb Don't include "anti-followed" tags in email digest (#14782) 2021-09-30 10:44:38 +07:00
feature_flag.rb Adds a feature flag for Data Update Scripts (#12641) 2021-02-10 18:22:27 +02:00
flare_tag.rb [Search 2.0] Homepage query (#13339) 2021-04-21 12:41:24 +02:00
instrumentation.rb Instrument EmailDigestArticleCollector (#13153) 2021-03-29 09:33:32 -04:00
medium_article_retrieval_service.rb Fix app/services' ruby 2.7 kwargs warnings (#13177) 2021-04-01 18:40:50 -04:00
notifications.rb Remove notifiable access from articles and comments notifications (#5415) [deploy] 2020-01-09 10:19:45 -05:00
rate_limit_checker.rb Pin posts to feed (#13807) 2021-06-04 10:54:53 +02:00
tag_adjustment_creation_service.rb [deploy] Rubocop: fix violations of Layout/LineLength (#9197) 2020-07-08 08:36:36 -05:00
tag_adjustment_update_service.rb [WIP] Allow mods to remove tags and send user notification (#1252) 2018-12-04 16:45:32 -05:00