Sha256: 6cf9774dcf26be390f0e74416fd269adda251a4ffce3470fdd3f5ec5a0f65742

Contents?: true

Size: 522 Bytes

Versions: 1

Compression:

Stored size: 522 Bytes

Contents

# frozen_string_literal: true

module Emailbutler
  module Ui
    class MessagesController < Emailbutler::UiController
      before_action :find_message

      def update
        Emailbutler.resend_message(@message)
        redirect_to ui_dashboard_index_path
      end

      def destroy
        Emailbutler.destroy_message(@message)
        redirect_to ui_dashboard_index_path
      end

      private

      def find_message
        @message = Emailbutler.find_message_by(uuid: params[:id])
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
emailbutler-0.3.0 app/controllers/emailbutler/ui/messages_controller.rb