Module: ShopifyApp::EnsureInstalled

Extended by:
ActiveSupport::Concern
Includes:
RedirectForEmbedded
Included in:
HomeController
Defined in:
app/controllers/concerns/shopify_app/ensure_installed.rb

Instance Method Summary collapse

Methods included from RedirectForEmbedded

add_app_bridge_redirect_url_header

Instance Method Details

#current_shopify_domainObject



29
30
31
32
33
34
35
36
37
38
# File 'app/controllers/concerns/shopify_app/ensure_installed.rb', line 29

def current_shopify_domain
  if params[:shop].blank?
    ShopifyApp::Logger.info("Could not identify installed store from current_shopify_domain")
    return
  end

  @shopify_domain ||= ShopifyApp::Utils.sanitize_shop_domain(params[:shop])
  ShopifyApp::Logger.info("Installed store:  #{@shopify_domain} - deduced from Shopify Admin params")
  @shopify_domain
end

#installed_shop_sessionObject



40
41
42
# File 'app/controllers/concerns/shopify_app/ensure_installed.rb', line 40

def installed_shop_session
  @installed_shop_session ||= SessionRepository.retrieve_shop_session_by_shopify_domain(current_shopify_domain)
end