diff --git a/app/controllers/conference_registrations_controller.rb b/app/controllers/conference_registrations_controller.rb index 8d4ae8a1..6a64ff8a 100644 --- a/app/controllers/conference_registrations_controller.rb +++ b/app/controllers/conference_registrations_controller.rb @@ -57,6 +57,8 @@ class ConferenceRegistrationsController < ApplicationController sign_in(@registration.user) end + MailblusterEditLeadJob.perform_later(@user, add_tags: ["snapcon-#{@conference.short_title}"]) + if @conference.tickets.visible.any? && !current_user.supports?(@conference) redirect_to conference_tickets_path(@conference.short_title), notice: 'You are now registered and will be receiving E-Mail notifications.' @@ -87,6 +89,7 @@ class ConferenceRegistrationsController < ApplicationController def destroy if @registration.destroy + MailblusterEditLeadJob.perform_later(@user, remove_tags: ["snapcon-#{@conference.short_title}"]) redirect_to root_path, notice: "You are not registered for #{@conference.title} anymore!" else diff --git a/app/models/user.rb b/app/models/user.rb index 04f51c4c..e4de8e8c 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -81,7 +81,7 @@ class User < ApplicationRecord after_save :touch_events after_create_commit :mailbluster_create_lead - after_destory_commit :mailbluster_delete_lead + after_destroy_commit :mailbluster_delete_lead after_update_commit :mailbluster_update_email, if: :saved_change_to_email? # add scope