Sha256: 2b00b4d091de678309d0000609211f856d4da5370eeebc99f454edd2bfeaf560

Contents?: true

Size: 515 Bytes

Versions: 34

Compression:

Stored size: 515 Bytes

Contents

module Workarea
  class Storefront::EmailSignupsController < Storefront::ApplicationController
    def show
      @content = Storefront::EmailSignupsViewModel.new
    end

    def create
      signup = Email.signup(params[:email])

      if signup.try(:valid?)
        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

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
workarea-storefront-3.4.45 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.44 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.43 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.42 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.41 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.40 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.39 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.38 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.37 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.36 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.35 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.34 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.33 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.32 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.31 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.30 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.29 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.28 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.27 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.26 app/controllers/workarea/storefront/email_signups_controller.rb