Class: Hyrax::MailboxController

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

Instance Method Summary collapse

Instance Method Details

#delete_allObject



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

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

#destroyObject



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

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

#indexObject



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

def index
  @messages = user_mailbox.inbox
end