mostrar notificaciones a los usuarios cuando alguien comenta en su
debate o responde a su comentario
This commit is contained in:
9
app/controllers/notifications_controller.rb
Normal file
9
app/controllers/notifications_controller.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class NotificationsController < ApplicationController
|
||||
before_action :authenticate_user!
|
||||
load_and_authorize_resource class: "User"
|
||||
|
||||
def index
|
||||
@notifications = current_user.notifications.unread.recent.for_render
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user