Sha256: cdfb38e1b8c61ea62c8f412819e92d4f8c1154e32a468db1392e3a18cf333272

Contents?: true

Size: 446 Bytes

Versions: 34

Compression:

Stored size: 446 Bytes

Contents

module Workarea
  module Admin
    module SettingsHelper
      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
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
workarea-admin-3.4.45 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.44 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.43 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.42 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.41 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.40 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.39 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.38 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.37 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.36 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.35 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.34 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.33 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.32 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.31 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.30 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.29 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.28 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.27 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.26 app/helpers/workarea/admin/settings_helper.rb