AO3-5556 Don't change collections on preview - Follow up PR#5820
Open
pmonfort wants to merge 9 commits into
Open
AO3-5556 Don't change collections on preview - Follow up PR#5820pmonfort wants to merge 9 commits into
pmonfort wants to merge 9 commits into
Conversation
I think it's pre-existing, but it's vaguely related, so I might as well fix it.
0e88cf1 to
809c2e6
Compare
- Extract AssociationAssignment into its own concern - Restore update_bookmarker_collections_index in Bookmarkable - Fix set_anon_unrevealed for new records in Collectible - Reorder CollectionItem callbacks per rubocop-rails 2.12.4 - Normalize locale files and add missing i18n keys
- Update specs to use item: instead of work: for CollectionItem - Fix stale tags cache in rake spec with collection.reload - Update bookmark controller spec for simplified flash message - Fix cucumber scenario: remove non-existent flash assertion
809c2e6 to
4ef0c3f
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Pull Request Checklist
AO3-1234 Fix thing)Issue
https://otwarchive.atlassian.net/browse/AO3-5556
Purpose
Follow-up to #4501 by @tickinginstant, adopting and completing the work from that PR.
Original PR (#4501)
collections_to_addandcollections_to_remove.This PR
CollectionItemto follow Rails convention (before_validation→before_save→after_save→after_create_commit→after_destroy→after_commit)Collectible(# Note:→# NOTE:) per Hound/Rubocop conventionassign_through_associationfromApplicationRecordinto anAssociationAssignmentconcern, included only inCollectibleandTaggablecollections_meta_taghelper inWorksHelperto replace variable assignment inworks/_meta.html.erbI follow), not a button (I press)Testing Instructions
Steps to reproduce the bug
indication on the preview page if the collection is unrevealed)
Automated tests
bundle exec rspec spec/models/collection_item_spec.rb spec/models/concerns/collectible_spec.rb spec/lib/works_owner_spec.rb— 65 examples, 0 failuresbundle exec cucumber features/collections/work_preview_collections.feature— 6 scenarios, 6 passedReferences
Follow-up to #4501
Credit
Pablo Monfort (he/him))