require 'open_food_network/spree_api_key_loader'

class RegistrationController < BaseController
  include OpenFoodNetwork::SpreeApiKeyLoader
  before_action :load_spree_api_key, only: [:index]
  before_action :check_user, except: :authenticate
  layout 'registration'

  def index
    @enterprise_attributes = { sells: 'none' }
  end

  private

  def check_user
    if spree_current_user.nil?
      redirect_to registration_auth_path(anchor: "signup?after_login=#{request.env['PATH_INFO']}")
    elsif !spree_current_user.can_own_more_enterprises?
      render :limit_reached
    end
  end
end

require 'open_food_network/spree_api_key_loader'

class RegistrationController < BaseController
  include OpenFoodNetwork::SpreeApiKeyLoader

  layout 'registration'
  helper 'map'

  before_action :load_spree_api_key, only: [:index]
  before_action :check_user, except: :authenticate

  def index
    @enterprise_attributes = { sells: 'none' }
  end

  private

  def check_user
    if spree_current_user.nil?
      redirect_to registration_auth_path(anchor: "signup?after_login=#{request.env['PATH_INFO']}")
    elsif !spree_current_user.can_own_more_enterprises?
      render :limit_reached
    end
  end
end

Add map helper to RegistrationController
Add map helper to RegistrationController

Fixes 3 errors including:

Registration Terms of Service agreement if accepting Terms of Service is not required allows registration as normal
     Failure/Error: super

     ActionView::Template::Error:
       undefined method `using_google_maps?' for #<#<Class:0x00007fd4949c4558>:0x00007fd499dd0ae8>
     # ./app/helpers/application_helper.rb:20:in `method_missing'
     # ./app/views/registration/steps/_details.html.haml:60:in `_app_views_registration_steps__details_html_haml___1911121144363058234_70275472163280'
     # ./app/views/registration/index.html.haml:12:in `block in _app_views_registration_index_html_haml__993897347679518865_70275545598940'
     # ./app/views/registration/index.html.haml:11:in `each'
     # ./app/views/registration/index.html.haml:11:in `_app_views_registration_index_html_haml__993897347679518865_70275545598940'
     # ./lib/open_food_network/rack_request_blocker.rb:36:in `call'
     # ------------------
     # --- Caused by: ---
     # NoMethodError:
     #   undefined method `using_google_maps?' for #<#<Class:0x00007fd4949c4558>:0x00007fd499dd0ae8>
     #   ./app/helpers/application_helper.rb:20:in `method_missing'
