Class: Spree::Admin::ThemesPreviewController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/spree/admin/themes_preview_controller.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



13
14
15
16
17
# File 'app/controllers/spree/admin/themes_preview_controller.rb', line 13

def destroy
  cookies.delete(:preview)
  @theme.close_preview
  redirect_to admin_themes_path
end

#showObject



7
8
9
10
11
# File 'app/controllers/spree/admin/themes_preview_controller.rb', line 7

def show
  cookies[:preview] = @theme.name
  @theme.open_preview
  redirect_to root_path(theme: @theme.id, mode: 'preview')
end