app/controllers/sitemap_controller.rb
# This code is mostly copy-pasted from the MarketplaceLookup middleware
#
# This is the only controller action where we use params to identify the
# community, thus we don't get the community by the middleware.
#
This code is mostly copy-pasted from the MarketplaceLookup middleware
This is the only controller action where we use params to identify the
community, thus we don't get the community by the middleware.
This code is mostly copy - pasted from the MarketplaceLookup middleware This is the only controller action where we use params to identify the community thus we don ' t get the community by the middleware .
def redirect_reason(marketplace)
    app_domain = URLUtils.strip_port_from_host(::APP_CONFIG.domain)
    plan =
      if marketplace
        PlanService::API::Api.plans.get_current(community_id: marketplace.id).data
      end
    no_marketplaces =
      if marketplace
        false
      else
        Community.count == 0
      end
    MarketplaceRouter.redirect_reason(
      community: ::MarketplaceRouter.community_hash(marketplace, plan),
      host: request.host,
      no_communities: no_marketplaces,
      app_domain: app_domain)
  end
def redirect_reason ( marketplace ) app_domain = URLUtils . strip_port_from_host ( :: APP_CONFIG . domain ) plan = if marketplace PlanService :: API :: Api . plans . get_current ( community_id : marketplace . id ) . data end no_marketplaces = if marketplace false else Community . count == 0 end MarketplaceRouter . redirect_reason ( community : :: MarketplaceRouter . community_hash ( marketplace , plan ) , host : request . host , no_communities : no_marketplaces , app_domain : app_domain ) end
This code is mostly copy-pasted from the MarketplaceLookup middleware
This is the only controller action where we use params to identify the
community, thus we don't get the community by the middleware.
This code is mostly copy - pasted from the MarketplaceLookup middleware This is the only controller action where we use params to identify the community thus we don ' t get the community by the middleware .
marketplace