Skip to content

Conversation

@not-varram
Copy link

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)

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.

1 participant