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.25 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.24 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.23 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.22 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.21 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.20 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.19 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.18 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.17 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.16 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.15 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.14 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.13 app/helpers/workarea/admin/settings_helper.rb
workarea-admin-3.4.12 app/helpers/workarea/admin/settings_helper.rb