Files
fizzy/app/controllers/notifications/bulk_readings_controller.rb
T
2025-12-10 09:23:52 +01:00

22 lines
414 B
Ruby

class Notifications::BulkReadingsController < ApplicationController
def create
Current.user.notifications.unread.read_all
respond_to do |format|
format.html do
if from_tray?
head :ok
else
redirect_to notifications_path
end
end
format.json { head :no_content }
end
end
private
def from_tray?
params[:from_tray]
end
end