Files
fizzy/app/controllers/cards/readings_controller.rb
T
Stanko K.R. 36ee253a1a Stack notifications everywhere
We had client-side notification stacking in the tray since launch, but now we want to stack notifications in the notifications page, in API responses and in email bundles.
2026-02-12 10:29:50 +01:00

19 lines
327 B
Ruby

class Cards::ReadingsController < ApplicationController
include CardScoped
def create
@card.read_by(Current.user)
record_board_access
end
def destroy
@card.unread_by(Current.user)
record_board_access
end
private
def record_board_access
@card.board.accessed_by(Current.user)
end
end