Class: DiscoApp::InstallController

Inherits:
ApplicationController
  • Object
show all
Includes:
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.



6
7
8
9
# File 'app/controllers/disco_app/install_controller.rb', line 6

def install
  AppInstalledJob.perform_later(@shop.shopify_domain)
  redirect_to action: :installing
end

#installingObject

Display an “installing” page.



12
13
14
15
16
# File 'app/controllers/disco_app/install_controller.rb', line 12

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

#uninstallingObject

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



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

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