docbrown/spec/factories
Ridhwana b2d24f291b
Display Ads: Target by Tag on Posts with matching Tag(s) on the user facing side (#18664)
* feat: Add a pack file that pulls in the MultiSelect Component

* feat: move the tags to its own component

* save tags

* refactor: create a getCSRFToken function in the packs files so that it can be used in the admin

* feat: import the new module in request.js

* feat: remove unnecessary id

* feat: first pass of csrf token test

* chore: update the test

* fix: csrf token

* feat: hide the enw functionality behinda  feature flag

* fix: loading form twice

* refactor: import for csrftoken

* chore: update the description of the function

* feat: use acts_on_taggable to craete a relationship between display_ad and tag

* feat: add a tag field to the display_ad form

* feat: add the selected tags from the multiselect autocomplete component to the input text field that references the tag_list

* feat: add the tag_list to the controller so that we can save it to the db with the display ad parameters

* feat: pull out the tag validation from the article and the display_ads into a concern

* feat: write soem tests for validating the tag on the display_ads model

* feat: add the tag_list as a hidden field

* feat: set the selected tags on edit

* feat: add a js class for the placement area

* feat: use the change in the dropdown to determine whether we show the tags field dropdown

* refactor: rename and brak up fucntions

* feat: show the tags field if the value of the placement area is already set

* fix: move if statement out of the change event

* feat: hide tags field and clear the tag list

* refactor: delete the display ads

* tests: ensure that we test the toggle

* fix:ensure that the tags on the hidden field show up as a string in the input field

* feat: update the jsdoc

* fix: no need to replace space with comma since we showing as string in form

* feat: update the name of the label

* fix: add hidden back

* feat: add cached_tag_list to displya_ads + the index

* feat: udpdate the schema

* refactor: move the scopes into the a module that can be re-used between display_ads and articles

* feat: account for showing display ads with the targeted tags that match the article

* feat: write a spec to show the correct ads based on the article_tags

* refactor: change TagListValidateable to Taggable and move out the not_cached_tagged_with_any scope

* test teh relationship between display ads and tags

* feat: write soem tests for validating the tag on the display_ads model

* chore: change empty to blank

* feat: will show display ads with no tags set if there are no article tags

* feat: add a newline
2022-11-03 15:51:51 +02:00
..
activesupport_events.rb Routine rubocop fixes (#4924) 2019-11-25 14:13:22 -05:00
ahoy.rb Add metrics around welcome notifications + their click events (#9239) 2020-07-10 12:30:45 +02:00
api_secrets.rb Listings creation and update API (#4014) 2019-09-24 07:03:52 -07:00
articles.rb Display Ads: Target by Tag on Posts with matching Tag(s) on the user facing side (#18664) 2022-11-03 15:51:51 +02:00
audit_logs.rb [deploy] Moderator and admin actions log (#6797) 2020-03-26 16:59:24 -05:00
badge_achievements.rb Bump factorybot rails (#475) 2018-08-24 17:28:26 -04:00
badges.rb Ensure model properties in factories are unique (#5190) 2019-12-20 12:21:16 -06:00
banished_users.rb Introduce BanishedUser table (#5589) [deploy] 2020-01-21 17:15:58 -05:00
broadcasts.rb Constantize broadcast messages (#16219) 2022-01-20 11:47:01 -06:00
collections.rb Show correct number in series truncation. (#13799) 2021-05-24 15:47:06 -06:00
comments.rb [deploy] Finalize deleting user associations (#5624) 2020-01-23 11:29:47 -05:00
consumer_apps.rb Have specs run without Redis and refactor ConsumerApp and Device (#13647) 2021-05-07 08:03:16 +02:00
context_notifications.rb Context Notifications (#17243) 2022-04-18 10:30:30 +03:00
credits.rb Allow users to belong to multiple orgs (#2583) 2019-06-04 09:30:52 -04:00
data_update_script.rb Feature:Send Alerts for Failed DataUpdateScripts to Datadog (#11381) 2020-11-12 10:59:54 -06:00
devices.rb Have specs run without Redis and refactor ConsumerApp and Device (#13647) 2021-05-07 08:03:16 +02:00
discussion_locks.rb Create DiscussionLocks (#13905) 2021-06-10 11:04:33 -04:00
display_ad_events.rb Extracting constants and tidying tests (#15946) 2022-01-05 09:19:39 -05:00
display_ads.rb Fix inconsistencies with DisplayAd (#14789) 2021-09-28 09:22:07 -04:00
email_authorizations.rb [deploy] Add EmailAuthorization model (#6335) 2020-03-02 12:14:24 -05:00
email_messages.rb [deploy] Add missing foreign keys to ahoy_messages and articles (#10321) 2020-09-16 19:47:03 +02:00
feedback_messages.rb [deploy] Enforce Uniq Abuse Reports from Reporters (#7831) 2020-05-14 09:03:10 -04:00
field_test_memberships.rb Remove concept of "ongoing" field tests and clarify a/b test instructions/expectations. (#11734) 2020-12-07 13:52:54 -05:00
follow.rb Fix delayed job errors related to follows #1621 (#1835) 2019-02-23 18:16:20 -08:00
gdpr_delete_requests.rb feat: add an inflection and change instances of gdpr to GDPR (#17567) 2022-05-04 16:20:46 +02:00
github_repos.rb Ensure model properties in factories are unique (#5190) 2019-12-20 12:21:16 -06:00
html_variant_trials.rb [deploy] Refactor:Move Remove Old HTML Variant Data task to Sidekiq (#9925) 2020-08-22 18:36:22 -05:00
html_variants.rb Drop tables related to HtmlVariant tracking, ignore HtmlVariant.success_rate column (#18615) 2022-10-26 14:46:02 +03:00
identities.rb Fixed setting Identity#auth_data_dump in seeds and factory (#15874) 2021-12-28 09:02:15 +03:00
listing_categories.rb [deploy] Rename classified listings (#7910) 2020-05-27 13:35:09 +00:00
listings.rb [deploy] Rename classified listings (#7910) 2020-05-27 13:35:09 +00:00
mentions.rb Fix mention validation when validating an empty instance (#3188) 2019-06-18 21:36:01 -04:00
navigation_links.rb Static Sections for Site Navigation - Pt1 (#14213) 2021-07-14 11:01:56 -04:00
note.rb [deploy] Finalize deleting user associations (#5624) 2020-01-23 11:29:47 -05:00
notification_subscriptions.rb [deploy] Finalize deleting user associations (#5624) 2020-01-23 11:29:47 -05:00
notifications.rb Create rake Task to Destroy Old Notifications (#5180) [deploy] 2019-12-26 13:17:34 -06:00
organization_memberships.rb [deploy] Rubocop: fix violations of Layout/LineLength (#9197) 2020-07-08 08:36:36 -05:00
organizations.rb Fix rubocop Rails.root.path complaints (#5114) 2019-12-16 12:13:15 -05:00
page_views.rb Pro: add referrers to dashboard and single article stats (#3295) 2019-06-25 13:58:09 -04:00
pages.rb Improve test speed (#3957) [ci skip] 2019-09-12 16:17:20 -04:00
podcast_episode_appearances.rb Add podcast_appearances joined table (forem#82) (#11354) 2020-11-30 17:12:52 +01:00
podcast_episode_rss_items.rb Update Faker to 2.1.0 (#3652) 2019-08-07 15:59:23 -04:00
podcast_episodes.rb Always show the browse section of podcasts regardless of featured (#16329) 2022-03-22 12:56:54 -04:00
podcast_ownership.rb Podcast ownership join table (MLH Fellowship #81) (#11410) 2020-11-19 12:41:17 +01:00
podcasts.rb Always show the browse section of podcasts regardless of featured (#16329) 2022-03-22 12:56:54 -04:00
poll_options.rb [deploy] Finalize deleting user associations (#5624) 2020-01-23 11:29:47 -05:00
poll_skips.rb [deploy] Finalize deleting user associations (#5624) 2020-01-23 11:29:47 -05:00
poll_votes.rb [deploy] Finalize deleting user associations (#5624) 2020-01-23 11:29:47 -05:00
polls.rb [deploy] Finalize deleting user associations (#5624) 2020-01-23 11:29:47 -05:00
profile_field_groups.rb [deploy] Introduce ProfileFieldGroup model (#10007) 2020-08-28 10:51:33 +07:00
profile_fields.rb Require profile fields to belong to a group (#16390) 2022-02-15 09:27:18 -06:00
profile_pins.rb [deploy] Finalize deleting user associations (#5624) 2020-01-23 11:29:47 -05:00
profiles.rb Make header fields in profile preview card dynamic (#14454) 2021-08-11 09:34:30 +07:00
rating_votes.rb [deploy] Add missing foreign keys to models related to users (#10018) 2020-08-31 15:39:57 +02:00
reactions.rb Remove reactions to a user when deleting the user (#15724) 2021-12-10 11:24:23 -06:00
response_templates.rb Add response templates model and table (#6615) 2020-03-16 09:52:03 +07:00
suspended_usernames.rb Prevent suspended users from self-deleting and returning (#12503) 2021-02-11 09:28:59 +07:00
tag_adjustments.rb Mod tooling: add tags via /mod refactor (#5017) 2019-12-13 13:02:45 -05:00
tags.rb v1 documentation via RSwag (#17990) 2022-07-08 14:37:30 -05:00
tweets.rb [deploy] Finalize deleting user associations (#5624) 2020-01-23 11:29:47 -05:00
user_blocks.rb [deploy] Finalize deleting user associations (#5624) 2020-01-23 11:29:47 -05:00
user_subscription.rb [deploy] Rubocop: fix violations of Layout/LineLength (#9197) 2020-07-08 08:36:36 -05:00
users.rb Try renaming moderator -> super_moderator (#18261) 2022-08-10 16:43:30 +02:00
users_notification_settings.rb Mobile mention notifications (#15780) 2021-12-16 11:06:54 -06:00
users_settings.rb Theming cleanup (#15237) 2021-11-09 10:11:55 -05:00