Module: Workarea::Admin::SettingsHelper
- Defined in:
- app/helpers/workarea/admin/settings_helper.rb
Instance Method Summary collapse
Instance Method Details
#sanitize_config_value(value) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/helpers/workarea/admin/settings_helper.rb', line 4 def sanitize_config_value(value) return if value.blank? case value when String, Symbol tag.code html_escape(value.to_s), class: 'code code--block' when Hash, Array tag.pre data: { expandable: '' } do tag.code JSON.pretty_generate(value), class: 'code code--block' end end end |