Class: Admin::MailchimpListsController

Inherits:
ApplicationController
  • Object
show all
Includes:
Effective::CrudController
Defined in:
app/controllers/admin/mailchimp_lists_controller.rb

Instance Method Summary collapse

Instance Method Details

#mailchimp_syncObject



8
9
10
11
12
13
14
15
16
# File 'app/controllers/admin/mailchimp_lists_controller.rb', line 8

def mailchimp_sync
  EffectiveResources.authorize!(self, :mailchimp_sync, Effective::MailchimpList)

  Effective::MailchimpList.sync!

  flash[:success] = "Successfully synced mailchimp lists"

  redirect_back(fallback_location: effective_mailchimp.admin_mailchimp_lists_path)
end