infusionvlc/infusion

View on GitHub
app/controllers/notifications_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

class NotificationsController < ApplicationController

  skip_before_action :verify_authenticity_token

  # Remove all notifications from a user's panel
  def mark_all_as_read
    current_user.notifications.update_all(read: true)
    puts current_user.username
    respond_to do |format|
      format.js   { render 'notifications/read'}
    end
  end

end