Class: MailboxController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/mailbox_controller.rb

Instance Method Summary collapse

Instance Method Details

#delete_allObject



8
9
10
11
# File 'app/controllers/mailbox_controller.rb', line 8

def delete_all
  user_mailbox.delete_all
  redirect_to sufia.notifications_path, alert: t('sufia.mailbox.notifications_deleted')
end

#destroyObject



13
14
15
16
17
# File 'app/controllers/mailbox_controller.rb', line 13

def destroy
  message_id = params[:id]
  alert = user_mailbox.destroy(message_id)
  redirect_to sufia.notifications_path, alert: alert
end

#indexObject



4
5
6
# File 'app/controllers/mailbox_controller.rb', line 4

def index
  @messages = user_mailbox.inbox
end