Class: Workarea::Storefront::EmailSignupsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Workarea::Storefront::EmailSignupsController
- Defined in:
- app/controllers/workarea/storefront/email_signups_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
#current_layout, #current_user_info, #health_check, #layout_content
Methods included from OrderLookup
Methods included from CurrentCheckout
#clear_current_order, #completed_order, #completed_order=, #current_checkout, #current_order, #current_order=, #current_shipping, #current_shippings, #logout
Instance Method Details
#create ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/controllers/workarea/storefront/email_signups_controller.rb', line 7 def create signup = Email.signup(params[:email]) if signup.try(:valid?) update_tracking!(email: signup.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 |
#show ⇒ Object
3 4 5 |
# File 'app/controllers/workarea/storefront/email_signups_controller.rb', line 3 def show @content = Storefront::EmailSignupsViewModel.new end |