Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

Add Redirect Model and UI For Editing Vanity URLs #93

Open
7 of 9 tasks
alexfinnarn opened this issue Jul 2, 2021 · 0 comments
Open
7 of 9 tasks

Add Redirect Model and UI For Editing Vanity URLs #93

alexfinnarn opened this issue Jul 2, 2021 · 0 comments
Assignees

Comments

@alexfinnarn
Copy link
Contributor

alexfinnarn commented Jul 2, 2021

In https://github.com/CUCentralAdvancement/crowdfunding-cu/issues/29, the code reads from a redis instance on Heroku but there is no easy way to set values. Sure, I can do this via the command line, but actual users won't want to do that...or search for existing keys that way. The most logical place to put this is in the CMS since it has user management already.

The easiest and most straightforward way to manage this is to create a scaffold for a Redirect resource. This way, the redirect can expire and have other properties. This will duplicate the redirect data and allow for it to be reloaded if the redis instance fails.

Acceptance Criteria

  • rails g scaffold Redirect source:string redirect:string expiration:datetime status:enum
  • Add /admin/redirects resources routes for editing
  • Add after_action on the Redirect model to post to redis after successful update
  • Use a redis gem, for example: https://github.com/redis/redis-rb
  • Add Cypress test for adding/removing entries
  • Add help article for using this feature. Place the help link by the title of the listing, new, and edit forms.
  • Seed data using redirects.json from crowdfunding-cu

Next Issue

After this issue is completed, the whole vanity URL process can move to the CMS and crowdfunding-cu, and Drupal 7 will not be needed for that part of the fund update process.

  • Add "owner" to models? The Workfront form can capture the email, which is all that's needed to prompt a decision on whether to expire/deactivate things.
  • Deactivate redirect removes the key from Redis vs. deleting the redirect. Otherwise, the status field is useless.
@alexfinnarn alexfinnarn changed the title Add UI For Editing Vanity URLs Add Redirect Model and UI For Editing Vanity URLs Jul 6, 2021
@alexfinnarn alexfinnarn self-assigned this Jul 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant