Class: NotificationsController

Inherits:
ApplicationController show all
Defined in:
lib/engine/app/controllers/notifications_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#backend, #redis_not_available

Instance Method Details

#destroyObject



9
10
11
12
13
# File 'lib/engine/app/controllers/notifications_controller.rb', line 9

def destroy
  notification = Notification.find(params[:id])
  notification.destroy
  redirect_to action: :index
end

#indexObject



5
6
7
# File 'lib/engine/app/controllers/notifications_controller.rb', line 5

def index
  @notifications = Notification.paginate(:page => params[:page], :per_page => 20)
end