DEV: Add DEBUG_PRELOADED_APP_DATA to log pre-loaded JSON in development (#8873)

Extracted from #8772

This will allow developers (in rails development mode only) to log pre-loaded JSON app data to the browser console for inspection.
This commit is contained in:
Martin Brennan
2020-02-06 13:14:33 +10:00
committed by GitHub
parent 542e62ccf0
commit 697d4720df
3 changed files with 41 additions and 2 deletions

View File

@ -475,6 +475,10 @@ module ApplicationHelper
if Rails.env.development?
setup_data[:svg_icon_list] = SvgSprite.all_icons(theme_ids)
if ENV['DEBUG_PRELOADED_APP_DATA']
setup_data[:debug_preloaded_app_data] = true
end
end
if guardian.can_enable_safe_mode? && params["safe_mode"]