Merge pull request #1244 from basecamp/invalidate-watches

Invalidate cards when watchers change
This commit is contained in:
Jorge Manrubia
2025-10-06 15:49:57 +02:00
committed by GitHub
2 changed files with 5 additions and 1 deletions
+4 -1
View File
@@ -53,7 +53,10 @@ module Collection::Accessible
private
def grant_access_to_creator
accesses.create(user: creator, involvement: :watching)
# Don't interfere with the abandon cards system
Access.no_touching do
accesses.create(user: creator, involvement: :watching)
end
end
def grant_access_to_everyone
@@ -7,6 +7,7 @@ class Cards::RecoversControllerTest < ActionDispatch::IntegrationTest
test "create" do
abandoned_card = collections(:writebook).cards.create! creator: users(:kevin)
travel_to 2.seconds.from_now
abandoned_card.update!(title: "An edited title")
unsaved_card = collections(:writebook).cards.create! creator: users(:kevin)