Class: Admin::ScreenedEmailsController

Inherits:
StaffController
  • Object
show all
Defined in:
app/controllers/admin/screened_emails_controller.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



9
10
11
12
13
# File 'app/controllers/admin/screened_emails_controller.rb', line 9

def destroy
  screen = ScreenedEmail.find(params[:id].to_i)
  screen.destroy!
  render json: success_json
end

#indexObject



4
5
6
7
# File 'app/controllers/admin/screened_emails_controller.rb', line 4

def index
  screened_emails = ScreenedEmail.limit(200).order("last_match_at desc").to_a
  render_serialized(screened_emails, ScreenedEmailSerializer)
end