Class: Nuntius::Admin::MessagesController

Inherits:
Nuntius::ApplicationAdminController show all
Defined in:
app/controllers/nuntius/admin/messages_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



8
9
10
11
# File 'app/controllers/nuntius/admin/messages_controller.rb', line 8

def index
  @messages = Nuntius::Message.visible.order(created_at: :desc)
  @messages = @messages.where(template_id: params[:template_id]) if params[:template_id]
end

#resendObject



17
18
19
20
21
# File 'app/controllers/nuntius/admin/messages_controller.rb', line 17

def resend
  @message = Nuntius::Message.visible.find(params[:id])
  @message.resend
  respond_with @message, success: t(".resend_success"), error: t(".resend_error")
end

#showObject



13
14
15
# File 'app/controllers/nuntius/admin/messages_controller.rb', line 13

def show
  @message = Nuntius::Message.visible.find(params[:id])
end