Class: Workarea::Storefront::ApplicationController

Inherits:
ApplicationController
  • Object
show all
Includes:
Authentication, CurrentRelease, Impersonation, CurrentCheckout, OrderLookup
Defined in:
app/controllers/workarea/storefront/application_controller.rb

Instance Method Summary collapse

Methods included from OrderLookup

#lookup_order, #lookup_order=

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

#current_layoutObject



32
33
34
35
36
37
38
# File 'app/controllers/workarea/storefront/application_controller.rb', line 32

def current_layout
  if request.xhr? && params[:layout].to_s != 'true'
    false
  else
    'workarea/storefront/application'
  end
end

#current_user_infoObject



21
22
23
# File 'app/controllers/workarea/storefront/application_controller.rb', line 21

def 
  render 'workarea/storefront/users/current_user'
end

#health_checkObject



17
18
19
# File 'app/controllers/workarea/storefront/application_controller.rb', line 17

def health_check
  render plain: 'ok'
end

#layout_contentObject



25
26
27
28
29
30
# File 'app/controllers/workarea/storefront/application_controller.rb', line 25

def layout_content
  @layout_content ||= ContentViewModel.new(
    Content.for('layout'),
    view_model_options
  )
end