From 1437bcb3b73b353c4bf276d53294677d29ea00a7 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 17 Apr 2025 14:29:12 +0200 Subject: [PATCH] Clearer about where these are being sent --- app/controllers/cards/pins_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/cards/pins_controller.rb b/app/controllers/cards/pins_controller.rb index c6317f095..2e0d12554 100644 --- a/app/controllers/cards/pins_controller.rb +++ b/app/controllers/cards/pins_controller.rb @@ -6,20 +6,20 @@ class Cards::PinsController < ApplicationController def create pin = @card.pin_by Current.user - broadcast_my_new pin + broadcast_add_to_tray pin end def destroy pin = @card.unpin_by Current.user - broadcast_my_removed pin + broadcast_remove_from_tray pin end private - def broadcast_my_new(pin) + def broadcast_add_to_tray(pin) pin.broadcast_prepend_later_to [ Current.user, :pins ], target: "pins", partial: "my/pins/pin" end - def broadcast_my_removed(pin) + def broadcast_remove_from_tray(pin) pin.broadcast_remove_to [ Current.user, :pins ] end end