Class: MailManager::BouncesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/mail_manager/bounces_controller.rb

Instance Method Summary collapse

Instance Method Details

#dismissObject



20
21
22
23
# File 'app/controllers/mail_manager/bounces_controller.rb', line 20

def dismiss
  @bounce.dismiss
  redirect_to @bounce
end

#fail_addressObject



25
26
27
28
# File 'app/controllers/mail_manager/bounces_controller.rb', line 25

def fail_address
  @bounce.fail_address
  redirect_to @bounce
end

#indexObject



5
6
7
8
9
10
11
12
13
14
15
# File 'app/controllers/mail_manager/bounces_controller.rb', line 5

def index
  params[:bounce] = Hash.new unless params[:bounce]
  status = params[:bounce][:status] || nil
  @mailings = Mailing.order("created_at desc")
  @bounces = Bounce.scoped
  @bounces = @bounces.by_mailing_id(@mailing.id) if @mailing.present?
  @bounces = @bounces.by_status(status) if status.present?
  @bounces = @bounces.order("created_at desc").paginate(
    :page => (params[:page] || 1)
  )
end

#showObject



17
18
# File 'app/controllers/mail_manager/bounces_controller.rb', line 17

def show
end