Sha256: 0c4f560d04886afd446d95e80ccb2f5f51f65d1dee5d4ed1fc95c5f1ea2187ee

Contents?: true

Size: 511 Bytes

Versions: 16

Compression:

Stored size: 511 Bytes

Contents

class MailboxController < ApplicationController
  before_action :authenticate_user!

  def index
    @messages = user_mailbox.inbox
  end

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

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

  private

    def user_mailbox
      UserMailbox.new(current_user)
    end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
sufia-7.4.1 app/controllers/mailbox_controller.rb
sufia-7.4.0 app/controllers/mailbox_controller.rb
sufia-7.3.1 app/controllers/mailbox_controller.rb
sufia-7.3.0 app/controllers/mailbox_controller.rb
sufia-7.3.0.rc3 app/controllers/mailbox_controller.rb
sufia-7.3.0.rc2 app/controllers/mailbox_controller.rb
sufia-7.3.0.rc1 app/controllers/mailbox_controller.rb
sufia-7.2.0 app/controllers/mailbox_controller.rb
sufia-7.1.0 app/controllers/mailbox_controller.rb
sufia-7.0.0 app/controllers/mailbox_controller.rb
sufia-7.0.0.rc2 app/controllers/mailbox_controller.rb
sufia-7.0.0.rc1 app/controllers/mailbox_controller.rb
sufia-7.0.0.beta4 app/controllers/mailbox_controller.rb
sufia-7.0.0.beta3 app/controllers/mailbox_controller.rb
sufia-7.0.0.beta2 app/controllers/mailbox_controller.rb
sufia-7.0.0.beta1 app/controllers/mailbox_controller.rb