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.25 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.24 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.23 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.22 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.21 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.20 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.19 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.18 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.17 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.16 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.15 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.14 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.13 app/controllers/workarea/storefront/email_signups_controller.rb
workarea-storefront-3.4.12 app/controllers/workarea/storefront/email_signups_controller.rb