Class: Effective::MailchimpController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/effective/mailchimp_controller.rb

Instance Method Summary collapse

Instance Method Details

#mailchimp_sync_userObject



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

def mailchimp_sync_user
  resource = current_user

  EffectiveResources.authorize!(self, :mailchimp_sync_user, current_user)

  resource.mailchimp_sync!

  flash[:success] = "Successfully synced mailchimp"

  redirect_back(fallback_location: '/settings')
end