Skip to content

Conversation

@spickermann
Copy link
Contributor

Motivation / Background

Mailers on the mailer preview page are listed in the order in which they were found in the descendants array. Which might or might not be in alphabetical order. The more mailers are defined in an application, the harder it gets to find a specific mailer on the preview page because of this non-intuitive order.

This PR ensures that the list of mailers on the mailer preview page are always returned in alphabetical order (by their titleized name) to make it easier to scan the list and find a specific mailer.

Please note that if a mailer has multiple methods, those methods are already returned sorted by the emails method.

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one change. Changes that are unrelated should be opened in separate PRs.
  • Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: [Fix #issue-number]
  • Tests are added or updated if you fix a bug or add a feature.
  • CHANGELOG files are updated for the changed libraries if there is a behavior change or additional feature. Minor bug fixes and documentation changes should not be included.

@rafaelfranca rafaelfranca merged commit 3bfda4c into rails:main Aug 21, 2023
@spickermann spickermann deleted the sort-mailers-on-preview-page-alphabetically branch August 21, 2023 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants