Class: DiscoApp::InstallController

Inherits:
ApplicationController
  • Object
show all
Includes:
Concerns::AuthenticatedController
Defined in:
app/controllers/disco_app/install_controller.rb

Instance Method Summary collapse

Instance Method Details

#installObject

Start the installation process for the current shop, then redirect to the installing screen.



9
10
11
12
# File 'app/controllers/disco_app/install_controller.rb', line 9

def install
  DiscoApp::AppInstalledJob.perform_later(@shop, cookies[DiscoApp::CODE_COOKIE_KEY], cookies[DiscoApp::SOURCE_COOKIE_KEY])
  redirect_to action: :installing
end

#installingObject

Display an “installing” page.



15
16
17
# File 'app/controllers/disco_app/install_controller.rb', line 15

def installing
  redirect_to main_app.root_path if @shop.installed?
end

#uninstallingObject

Display an “uninstalling” page. Should be almost never used.



20
21
22
# File 'app/controllers/disco_app/install_controller.rb', line 20

def uninstalling
  redirect_to main_app.root_path if @shop.uninstalled?
end