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-4989 Returning to referer if deleting bookmark #3178

Open
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants
Contributor

hatal175 commented Nov 22, 2017

Issue

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

Purpose

This makes it so you return to referer if you delete a bookmark unless you came from a page specifically editing or deleting it. I saw the pattern used in the comment controller but I'm not sure it it's the best way of implementing this.

Testing

Delete bookmark from all possible places. If page still exists (user bookmarks second page, recent bookmarks, etc.) then you should still be at that page.

Credit

Tal Hayon

Please use he.

hatal175 added some commits Nov 20, 2017

Owner

sarken commented Nov 22, 2017

Can keep it like it originally was and just add the page parameter to the path (i.e. redirect_to user_bookmarks_path(current_user, page: params[:page])), or does that lead to an error?

Contributor

hatal175 commented Nov 22, 2017

Owner

sarken commented Nov 22, 2017

Yeah, I think we can consider that behavior separately and focus on the problem described in the issue.

Contributor

hatal175 commented Nov 24, 2017

Looking at the code again, I really don't think the optimal solution would be to add the page somehow... the deletion link is deep inside the rendering parts and has no idea where it is rendered, nor I think it should know.

If this is not acceptable, I recommend closing this pull request and extending the requirements of this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment