docbrown/spec/models
Molly Struve e87dead7ad
Use new UserSetting and UserNotificationSettings and Ignore Related User Table Fields (#14121)
* schema file undelete description

* feat: v1 of the script

* Flesh out remaining enums under their categories

* complete UsersSettings data update script

* complete DUS for relevant attributes in users and profiles tables

* complete DUS for users_notification_settings

* alphabetize user_settings sql file

* safeguard against null values for "null: false" settings

* Set up actual UsersSettings DUS and specs files

* fix broken DUS script

* complete specs for UsersSetting DUS

* Address QA of specs

* complete specs for users_notification_settings DUS

* fix the typos (thanks Julianna!)

* begin implementation

* still building

* add missing attribute "email_membership_newsletter"

* complete sync code (except race condition for user profile)

* complete implementation, remains tests

* Address PR review and fix Travis fails

* remove superfluous Profile.new

* fix travis fails

* feat: update the users_notification_setting attributes from the user model

* feat: use the config fonts enums to display the fonts

* feat: loop through the keys

* fix profile = nil blowing up; add specs for notification_setting model

* remove unneeded spec

* remove feed validation until after sync code removed; fixes feed_import spec failures

* remove spec associated with feed_url validation in user_setting model

* fix failing spec 😅

* add TODO

* feat: set the user settings in the user controller  and use it in the customization form

* feat: move some update logic to the users settings controller thats being used from customization

* feat: show the updated values form the users_settingd and not the user instance

* Generalize redirect back to current tab

* still trying to reflect changed theme upon refresh

* customizations take effect on refresh

* remove 'with_feed' scope from user model

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

* start with takeover for fields previously in profiles table

* Takeover code for `publishing_from_rss` section in Settings (#13914)

* implement takeover code part 1

* implement takeover code

* fix feed fetch

* need rhymes help

* complete implementation; specs pending

* fix STUPID omission that caused so many headaches 😫

* implement profile fields pointing to users_settings 🎉

* run migrations

* implement inbox type & guidelines takeover code; specs pending (#13911)

* Point changes in notification settings to `users_notification_settings` table (#13910)

* implement takeover code; remains specs

* address PR feedback; remove related sync code

* address PR review feedback

* need help with routing and specs

* address pr review

* addressing pr review

* Treat implementation edge cases and omissions 😅

* fix uncommented comment

* fixing implementation cases

* address more PR review feedback

* fixing notifications use-cases

* refactor settings controller

* more pr review changes

* solving bugs

* fix broken onboarding

* handle eperience_level calls

* more fixes

* remove unneeded mappings

* add To-dos for quety updates

* remove done TODO

* purge done TODOs

* update notification_settings-related queries

* start fixing specs

* fixing specs

* fix notification and lrg_forem specs

* fixing broken specs

* still fixing

* fix line dif and remove reloads from user.rb

* run specs

* silence bullet and other fixes

* remove setting migration scripts and specs, fix more settings for specs

* handle missing user for article builder and fix notification specs

* fix some final controller specs and re-add incorrectly removed specs

* remove deprecated data update scripts and related workers, put travis back

* refactor admin tags mods controller, write/move specs for users notifications settings controller

* schema cleanup and other small refactors for consistency

* set field we can invalidate in spec via active record instead of at the db level

* remove I think an uneccessary hook call from subscribe_to_mailchimp_newsletter

* use bnefore_create to setup settings, please dont blow up the test suite

* mailchimp bot fix

* remove decorator in favor of single model method

Co-authored-by: Arit Amana <msarit@gmail.com>
Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
Co-authored-by: Arit Amana <32520970+msarit@users.noreply.github.com>
Co-authored-by: Jamie Gaskins <jamie@forem.com>
2021-07-08 09:31:34 -05:00
..
ahoy
concerns Remove Elasticsearch ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ (#13606) 2021-05-03 11:09:45 -04:00
settings Revert dynamic email config changes (#13983) 2021-06-14 13:08:24 -04:00
shared_examples Fix Ruby 2.7 kwargs' warnings & misc spec warnings (#13256) 2021-04-06 16:57:59 -04:00
users Use new UserSetting and UserNotificationSettings and Ignore Related User Table Fields (#14121) 2021-07-08 09:31:34 -05:00
webhook
api_secret_spec.rb
application_record_spec.rb
article_destroy_spec.rb
article_spec.rb Create DiscussionLocks (#13905) 2021-06-10 11:04:33 -04:00
audit_log_spec.rb
badge_achievement_spec.rb Configure badge credits by admins (#13145) 2021-03-30 10:58:48 +03:00
badge_spec.rb Refactor cache purging (#12811) 2021-03-02 10:09:05 -05:00
banished_user_spec.rb
broadcast_spec.rb
chat_channel_membership_spec.rb Remove Elasticsearch ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ (#13606) 2021-05-03 11:09:45 -04:00
chat_channel_spec.rb
collection_spec.rb
comment_spec.rb Create DiscussionLocks (#13905) 2021-06-10 11:04:33 -04:00
consumer_app_spec.rb Have specs run without Redis and refactor ConsumerApp and Device (#13647) 2021-05-07 08:03:16 +02:00
credit_spec.rb
custom_profile_field_spec.rb
data_update_script_spec.rb Save Data Update Script errors to database and show them on http://localhost:3000/admin/data_update_scripts (#12348) 2021-01-21 14:48:34 +01:00
device_spec.rb Have specs run without Redis and refactor ConsumerApp and Device (#13647) 2021-05-07 08:03:16 +02:00
discussion_lock_spec.rb Create DiscussionLocks (#13905) 2021-06-10 11:04:33 -04:00
display_ad_event_spec.rb
display_ad_spec.rb
email_authorization_spec.rb
email_message_spec.rb
event_spec.rb
feedback_message_spec.rb [15-min-fix] Better feedback messaging (#13254) 2021-04-12 09:05:45 -04:00
follow_spec.rb Use new UserSetting and UserNotificationSettings and Ignore Related User Table Fields (#14121) 2021-07-08 09:31:34 -05:00
forem_instance_spec.rb Create Settings::SMTP (#13943) 2021-06-14 10:29:43 -04:00
github_issue_spec.rb ✂️ Remove the approvals gem ✂️ (#12978) 2021-03-19 13:28:06 -07:00
github_repo_spec.rb Fix Ruby 2.7 kwargs' warnings & misc spec warnings (#13256) 2021-04-06 16:57:59 -04:00
hair_trigger_spec.rb Search results: prioritize articles titles (#13918) 2021-06-09 14:28:19 +02:00
html_variant_spec.rb [15 min fix] Fallback to the image URL if Cloudinary/Imgproxy are not configured (#13767) 2021-05-19 15:03:20 +02:00
html_variant_success_spec.rb
html_variant_trial_spec.rb
identity_spec.rb
listing_category_spec.rb
listing_spec.rb Remove Elasticsearch ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ (#13606) 2021-05-03 11:09:45 -04:00
mention_spec.rb
message_spec.rb Use new UserSetting and UserNotificationSettings and Ignore Related User Table Fields (#14121) 2021-07-08 09:31:34 -05:00
navigation_link_spec.rb Update NavigationLink handling (#12316) 2021-01-20 13:57:59 -05:00
note_spec.rb
notification_spec.rb UsersSettings RFC: Code to Sync User Settings updates to new tables (#13719) 2021-05-27 09:52:54 -04:00
notification_subscription_spec.rb
organization_membership_spec.rb
organization_spec.rb Organizations delete optimizations and refactoring (#13610) 2021-05-11 12:14:55 +03:00
page_spec.rb [15 min fix] Refactor private landing pages model code (#13982) 2021-06-15 18:17:15 +02:00
page_view_spec.rb
pinned_article_spec.rb Pin posts to feed (#13807) 2021-06-04 10:54:53 +02:00
podcast_episode_appearance_spec.rb
podcast_episode_spec.rb [15 min fix] Fallback to the image URL if Cloudinary/Imgproxy are not configured (#13767) 2021-05-19 15:03:20 +02:00
podcast_ownership_spec.rb
podcast_spec.rb
poll_option_spec.rb
poll_skip_spec.rb
poll_spec.rb
poll_vote_spec.rb
profile_field_group_spec.rb
profile_field_spec.rb
profile_pin_spec.rb
profile_spec.rb Drop profile fields for static attributes (#14109) 2021-07-01 14:30:40 -04:00
rating_vote_spec.rb
reaction_spec.rb Rename SiteConfig to Settings::General (#13573) 2021-05-21 14:45:37 +02:00
response_template_spec.rb
role_spec.rb Rename banned and comment_banned roles (#12270) 2021-04-06 10:12:14 -05:00
sponsorship_spec.rb
tag_adjustment_spec.rb
tag_spec.rb Remove Elasticsearch ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ ✂️ (#13606) 2021-05-03 11:09:45 -04:00
timeframe_spec.rb
tweet_spec.rb
user_block_spec.rb Fix and refactor hide user content (#12307) 2021-01-18 11:08:23 -05:00
user_role_spec.rb [Search 2.0] Users (#13453) 2021-04-24 19:06:06 +02:00
user_spec.rb Use new UserSetting and UserNotificationSettings and Ignore Related User Table Fields (#14121) 2021-07-08 09:31:34 -05:00
user_subscription_spec.rb