Skip to content

Replace hardcoded slug check with account-level setting#63

Open
bellisabell wants to merge 1 commit intomainfrom
bell/remove-hardcoded-slug
Open

Replace hardcoded slug check with account-level setting#63
bellisabell wants to merge 1 commit intomainfrom
bell/remove-hardcoded-slug

Conversation

@bellisabell
Copy link
Copy Markdown
Contributor

Summary

Fixes the hard-coded account slug check in SubscriptionVerificationsController.

Changes

  • Added sync_to_ghost boolean column to the accounts table (defaults to false)
  • Replaced the hardcoded @account.slug == 'philipithomas' check with @account.sync_to_ghost

Migration Notes

After running migrations, enable Ghost syncing for existing accounts via Rails console:

Account.find_by(slug: 'philipithomas')&.update!(sync_to_ghost: true)

Closes #26

- Add sync_to_ghost boolean column to accounts table
- Replace hardcoded 'philipithomas' slug check with @account.sync_to_ghost
- New accounts default to sync_to_ghost: false
- Existing account can be updated via migration or Rails console

Closes #26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Hard-coded account slug 'philipithomas' in SubscriptionVerificationsController

2 participants