Touch board when publication is created or destroyed (#2674)
Publishing or unpublishing a board didn't bust the `json.cache! board` fragment cache because `Board::Publication` didn't touch its parent board. The board's `updated_at` stayed stale, so subsequent GET requests continued serving cached JSON without `public_url`.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
class Board::Publication < ApplicationRecord
|
||||
belongs_to :account, default: -> { board.account }
|
||||
belongs_to :board
|
||||
belongs_to :board, touch: true
|
||||
|
||||
has_secure_token :key
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user