Class: DeadLetterOffice::DeadLettersController

Inherits:
ApplicationController show all
Defined in:
app/controllers/dead_letter_office/dead_letters_controller.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



9
10
11
12
13
14
15
16
17
18
19
# File 'app/controllers/dead_letter_office/dead_letters_controller.rb', line 9

def destroy
  @dead_letter = DeadLetter.find(params[:id])
  @dead_letter.destroy

  respond_to do |wants|
    wants.js
    wants.html do
      redirect_to dead_letters_path, notice: "Dead Letter has been removed."
    end
  end
end

#indexObject



5
6
7
# File 'app/controllers/dead_letter_office/dead_letters_controller.rb', line 5

def index
  @dead_letters = DeadLetter.scoped
end