-
Notifications
You must be signed in to change notification settings - Fork 662
AO3-6067 Uncategorized fandoms in collections not showing #5514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ReverM
wants to merge
23
commits into
otwcode:master
Choose a base branch
from
ReverM:AO3-6067
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+93
−9
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
341c874
First batch of work
ReverM 905d4f7
Added restriction to the tag pages
ReverM 7ad262f
Merge branch 'otwcode:master' into AO3-6067
ReverM 05bf0e1
Reverted autostyle
ReverM 8502d6c
Merge branch 'otwcode:master' into AO3-6067
ReverM d9c3cbe
Test + Fix
ReverM a5f3f67
Merge branch 'AO3-6067' of https://github.com/ReverM/otwarchive into …
ReverM d5c7307
Changed some names for readability
ReverM e27e433
Did not forget linter, forgot rubocop
ReverM d109571
Add test for no double counts
ReverM 556d1e7
Made sure that non-canonical aren't shown as well
ReverM e876c2b
Update app/models/search/search_counts.rb
ReverM fac8449
Changed behaviour when looking at collection specific tag
ReverM 9e8fa6f
Fixed lint issue
ReverM dd384ef
disabled caching
ReverM ce9edfc
Adressed comment and tried suggestion to make test work
ReverM 8db30ad
Moved suggestion
ReverM e0d1c2a
Maybe here will work?
ReverM 4ed7df5
Maybe this will do?
ReverM ee889fb
Trying something before resorting to writing a spec test
ReverM c225c80
For testing what the output is on GitHub's autotest
ReverM cd6206f
Attempt at a fix
ReverM 27c6d96
Changed search_count to see if it is more robust against test
ReverM File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,14 +70,23 @@ def show | |
| # if tag is NOT wrangled, prepare to show works, collections, and bookmarks that are using it | ||
| if [email protected] && [email protected] | ||
| @works = if logged_in? # current_user.is_a?User | ||
| @tag.works.visible_to_registered_user.paginate(page: params[:page]) | ||
| @tag.works.visible_to_registered_user | ||
| elsif logged_in_as_admin? | ||
| @tag.works.visible_to_admin.paginate(page: params[:page]) | ||
| @tag.works.visible_to_admin | ||
| else | ||
| @tag.works.visible_to_all.paginate(page: params[:page]) | ||
| @tag.works.visible_to_all | ||
| end | ||
| @bookmarks = @tag.bookmarks.visible.paginate(page: params[:page]) | ||
| @collections = @tag.collections.paginate(page: params[:page]) | ||
| @bookmarks = @tag.bookmarks.visible | ||
| @collections = @tag.collections | ||
| # if from a collection, only show works from that collection | ||
| if @collection.present? | ||
| @works &= @collection.works | ||
| @bookmarks = [] | ||
| @collections = [] | ||
| end | ||
| @works = @works.paginate(page: params[:page]) | ||
| @bookmarks = @bookmarks.paginate(page: params[:page]) | ||
| @collections = @collections.paginate(page: params[:page]) | ||
| end | ||
| # cache the children, since it's a possibly massive query | ||
| @tag_children = Rails.cache.fetch "views/tags/#{@tag.cache_key}/children" do | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.