From e2a411c23cab80138fe4e2778dc4907bc2eac002 Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Fri, 30 Apr 2021 17:59:06 +0100 Subject: [PATCH] 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 #<#: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 #<#:0x00007fd499dd0ae8> # ./app/helpers/application_helper.rb:20:in `method_missing' --- app/controllers/registration_controller.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/registration_controller.rb b/app/controllers/registration_controller.rb index 71e621f077..11f37fec13 100644 --- a/app/controllers/registration_controller.rb +++ b/app/controllers/registration_controller.rb @@ -2,9 +2,12 @@ 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 - layout 'registration' def index @enterprise_attributes = { sells: 'none' }