module Workarea decorate Storefront::EmailSignupsController, with: :emarsys do def create signup = Email.signup(params[:email]) if signup.try(:valid?) update_tracking!(email: signup.email) cookies[:emarsys_email] = params[:email] flash[:success] = t('workarea.storefront.flash_messages.email_signed_up') else flash[:error] = t('workarea.storefront.flash_messages.email_signup_error') end redirect_back fallback_location: root_path end end end