Skip to content

Conversation

@not-varram
Copy link
Contributor

@not-varram not-varram commented Jan 14, 2026

Pull Request Checklist

Issue

https://otwarchive.atlassian.net/browse/AO3-7263

Purpose

Fixes incorrect reference to current_user.preference.locale_for_mails in the preferences view. The view was using current_user.preference instead of the already-loaded @preference instance variable, which could potentially cause errors and was inconsistent with the rest of the form.

Changes:

  • Updated line 76 in app/views/preferences/index.html.erb to use @preference.locale_for_mails instead of current_user.preference.locale_for_mails
  • This makes it consistent with other references in the same view (e.g., @preference.preferred_locale on line 78)
  • Follows the same pattern used in app/views/help/preferences_locale.html.erb

Testing Instructions

  1. Login as policy_and_abuse, support or superadmin admin
  2. Navigate to a user’s preferences page
    a. Browse > Works
    b. Follow the link to an author’s pseud
    c. Click on preferences in the user sidebar
  3. Now just ensure the page loads and you dont see any errors

Credit

varram (he/him)

Copy link
Member

@marcus8448 marcus8448 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi varram,

Thanks for the pull request! It would be great if you could also add a test for this issue. (You might find preferences_edit.feature helpful when doing so)

@not-varram
Copy link
Contributor Author

hey! @marcus8448 I've made the changes you requested. Let me know if this is fine? (I'm pretty new to contributing to ao3 so any feedback is appreciated :))

Copy link
Member

@marcus8448 marcus8448 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation looks good! Just two notes for the tests.

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.

3 participants