diff --git a/app/controllers/notification_subscriptions_controller.rb b/app/controllers/notification_subscriptions_controller.rb index 42da9231..cdd1d28e 100644 --- a/app/controllers/notification_subscriptions_controller.rb +++ b/app/controllers/notification_subscriptions_controller.rb @@ -20,6 +20,12 @@ def create end end + def newsletter_subscribe + email = params.permit(:email)[:email] + list_name = 'Návody.Digital' + SubscribeToNewsletterJob.perform_later(email, list_name) if email + end + def confirm @subscriptions = NotificationSubscription.where(confirmation_token: params[:id]) @subscriptions.each do |subscription| diff --git a/app/views/components/_footer.html.erb b/app/views/components/_footer.html.erb index fa0f92c5..3300d47f 100644 --- a/app/views/components/_footer.html.erb +++ b/app/views/components/_footer.html.erb @@ -15,16 +15,12 @@
-