Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
AO3-5148: Fix broken redirect when replying from inbox #3032
Conversation
elzj
added some commits
Sep 7, 2017
| - if request.referer.match(/inbox/) | ||
| - redirect_to user_inbox_path(current_user, filters: params[:filters], page: params[:page]) | ||
| - elsif request.referer.match(/new/) | ||
| + if request.referer&.match(/inbox/) |
| @@ -331,7 +331,7 @@ def review | ||
| respond_to do |format| | ||
| format.html do | ||
| if params[:approved_from] == "inbox" | ||
| - redirect_to user_inbox_path(current_user, page: params[:page], filters: params[:filters]) and return | ||
| + redirect_to user_inbox_path(current_user, page: params[:page], filters: filter_params[:filters]) and return |
|
It looks reasonable to me, but I can hear the requests for tests :) |
|
james nailed it ;) |
sarken
added
the
Priority: Critical
label
Sep 8, 2017
sarken
merged commit a579e45
into
otwcode:master
Sep 8, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
elzj commentedSep 7, 2017
Issue
https://otwarchive.atlassian.net/browse/AO3-5148
Purpose
Fixes issue where replying to a comment from your inbox, with filters set, would error after creating the reply and attempting to redirect you. Also fixes the same issue with the review action from the inbox, and adds a couple of checks for a potentially nil request.referer.
Testing
Replying to and approving comments from the inbox should work with or without filters set.