Sha256: 65676462ccf8b83472a4c428cc66bebbdbb054e8eb28922face503a2881c51a0

Contents?: true

Size: 566 Bytes

Versions: 10

Compression:

Stored size: 566 Bytes

Contents

module Hyrax
  class MailboxController < ApplicationController
    before_action :authenticate_user!

    def index
      @messages = user_mailbox.inbox
    end

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

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

    private

      def user_mailbox
        UserMailbox.new(current_user)
      end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
hyrax-1.1.1 app/controllers/hyrax/mailbox_controller.rb
hyrax-1.1.0 app/controllers/hyrax/mailbox_controller.rb
hyrax-1.0.5 app/controllers/hyrax/mailbox_controller.rb
hyrax-1.0.4 app/controllers/hyrax/mailbox_controller.rb
hyrax-1.0.3 app/controllers/hyrax/mailbox_controller.rb
hyrax-1.0.2 app/controllers/hyrax/mailbox_controller.rb
hyrax-1.0.1 app/controllers/hyrax/mailbox_controller.rb
hyrax-1.0.0.rc2 app/controllers/hyrax/mailbox_controller.rb
hyrax-1.0.0.rc1 app/controllers/hyrax/mailbox_controller.rb
test_hyrax-0.0.1.alpha app/controllers/hyrax/mailbox_controller.rb