Skip to content

Commit

Permalink
update initial react data method wrapping hash in a json dump
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoleman21 committed Aug 21, 2024
1 parent f8bc1f0 commit 0f398e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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

Expand Down

0 comments on commit 0f398e0

Please sign in to comment.