Skip to content

AO3-6690 Choosing an FAQ language and going to Browse Works takes you to the list of works for the FAQ language#5662

Closed
ScottVenkataraman wants to merge 4 commits intootwcode:masterfrom
ScottVenkataraman:fix/faq-language
Closed

AO3-6690 Choosing an FAQ language and going to Browse Works takes you to the list of works for the FAQ language#5662
ScottVenkataraman wants to merge 4 commits intootwcode:masterfrom
ScottVenkataraman:fix/faq-language

Conversation

@ScottVenkataraman
Copy link
Copy Markdown
Contributor

Pull Request Checklist

Issue

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

Purpose

What does this PR do?
When a user logs in, goes to the FAQ page, selects a language for the FAQ page, and then navigates to browse drop down and selects 'works', this PR navigates the user to all works, rather than only works in the language specified in the FAQ page.

Testing Instructions

Follow the steps to reproduce on the jira ticket: https://otwarchive.atlassian.net/browse/AO3-6690

Credit

Scott Venkataraman he/him

…rl_options. Update default_locale_only, update_positions, and destroy to pass language_id explicitly. Fix destroy to redirect to the index path instead of the show path after deletion.
…ead of request.query_parameters in require_language_id to avoid OpenRedirectError. Redirect to manage page after update_positions instead of index. Fall back to slug in ArchiveFaq#to_param for newly created records where slug_was is nil

redirect_to url_for(request.query_parameters.merge(language_id: @i18n_locale.to_s))
end
redirect_to url_for(params.permit!.merge(language_id: @i18n_locale.to_s))

Check warning

Code scanning / Brakeman

Specify exact keys allowed for mass assignment instead of using permit! which allows any keys. Warning

Specify exact keys allowed for mass assignment instead of using permit! which allows any keys.
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