Class: Workarea::Admin::GuestBrowsingsController

Inherits:
ApplicationController show all
Includes:
Storefront::CurrentCheckout
Defined in:
app/controllers/workarea/admin/guest_browsings_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#current_user, #find_sort, #wrap_in_view_model, wrap_in_view_model

Methods included from Publishing

#allow_publishing!, #allow_publishing?, #set_publishing_options

Methods included from Visiting

#most_visited

Instance Method Details

#createObject



7
8
9
10
11
12
13
14
# File 'app/controllers/workarea/admin/guest_browsings_controller.rb', line 7

def create
  admin_browse_as_guest
  self.current_order = nil

  flash[:success] =
    t('workarea.admin.guest_browsing.flash_messages.started')
  redirect_to storefront.root_path
end

#destroyObject



16
17
18
19
20
21
22
# File 'app/controllers/workarea/admin/guest_browsings_controller.rb', line 16

def destroy
  stop_admin_guest_browsing
  self.current_order = nil

  flash[:success] = t('workarea.admin.guest_browsing.flash_messages.stopped')
  redirect_to users_path
end