Class: Workarea::Storefront::ApplicationController

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

Instance Method Summary collapse

Methods included from OrderLookup

#lookup_order, #lookup_order=

Methods included from UserActivity

#current_user_activity_id, #user_activity

Methods included from CurrentCheckout

#clear_current_order, #completed_order, #completed_order=, #current_checkout, #current_order, #current_order=, #current_shipping, #current_shippings

Methods included from HttpCaching

#cache_page, #http_caching?

Instance Method Details

#current_layoutObject



35
36
37
38
39
40
41
# File 'app/controllers/workarea/storefront/application_controller.rb', line 35

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

#current_user_infoObject



23
24
25
26
# File 'app/controllers/workarea/storefront/application_controller.rb', line 23

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

#health_checkObject



19
20
21
# File 'app/controllers/workarea/storefront/application_controller.rb', line 19

def health_check
  render plain: 'ok'
end

#layout_contentObject



28
29
30
31
32
33
# File 'app/controllers/workarea/storefront/application_controller.rb', line 28

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