Inline anemic method

This commit is contained in:
David Heinemeier Hansson
2025-04-16 15:34:28 +02:00
parent 13c44ba650
commit d00a0433e9
+1 -6
View File
@@ -2,12 +2,7 @@ class Cards::ReadingsController < ApplicationController
include CardScoped
def create
mark_card_notifications_read
Current.user.notifications.unread.where(card: @card).read_all
@notifications = Current.user.notifications.unread.ordered.limit(20)
end
private
def mark_card_notifications_read
Current.user.notifications.unread.where(card: @card).read_all
end
end