Merge branch 'master' into 177717903-move-constants-to-configuration-file

This commit is contained in:
Jimmy 2021-04-13 12:06:59 +08:00
commit e08a465889
15 changed files with 319 additions and 2 deletions

View file

@ -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