Class: DraftBox::EmailsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/draft_box/emails_controller.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



15
16
17
18
# File 'app/controllers/draft_box/emails_controller.rb', line 15

def destroy
  DraftBox::Email.find(params[:id]).destroy!
  redirect_to draft_box.emails_path
end

#destroy_allObject



20
21
22
23
# File 'app/controllers/draft_box/emails_controller.rb', line 20

def destroy_all
  DraftBox::Email.destroy_all
  redirect_to draft_box.emails_path
end

#indexObject



9
# File 'app/controllers/draft_box/emails_controller.rb', line 9

def index; end

#showObject



11
12
13
# File 'app/controllers/draft_box/emails_controller.rb', line 11

def show
  @email = DraftBox::Email.find(params[:id])
end