From 0f398e09f52226cf6d2c20f7db5d7499cec3d03d Mon Sep 17 00:00:00 2001 From: Dani Date: Wed, 21 Aug 2024 10:36:21 -0400 Subject: [PATCH] update initial react data method wrapping hash in a json dump --- app/controllers/application_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index d8f5528f7..af95e7a01 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -47,7 +47,7 @@ def authorize end def initial_react_data - { + JSON.dump({ csrfToken: form_authenticity_token, dropdownUrls: dropdown_urls, efolderAccessImagePath: ActionController::Base.helpers.image_path("help/efolder-access.png"), @@ -56,7 +56,7 @@ def initial_react_data trainingGuidePath: ActionController::Base.helpers.asset_path("training_guide.pdf"), userDisplayName: current_user.try(:display_name) || 'Help', userIsAuthorized: user_is_authorized? - }.to_json + }) end helper_method :initial_react_data