class HomeController
def index
def index @products = ShopifyAPI::Product.all(limit: 10) @webhooks = ShopifyAPI::Webhook.all end
def index
def index if ShopifyAPI::Context.embedded? && (!params[:embedded].present? || params[:embedded] != "1") redirect_to(ShopifyAPI::Auth.embedded_app_url(params[:host]) + request.path, allow_other_host: true) else @shop_origin = current_shopify_domain @host = params[:host] end end
def set_host
def set_host @host = params[:host] end