Method: EffectiveResourcesHelper#format_resource_value

Defined in:
app/helpers/effective_resources_helper.rb

#format_resource_value(value) ⇒ Object



256
257
258
259
260
261
# File 'app/helpers/effective_resources_helper.rb', line 256

def format_resource_value(value)
  @format_resource_tags ||= ActionView::Base.sanitized_allowed_tags.to_a + ['table', 'thead', 'tbody', 'tfoot', 'tr', 'td', 'th']
  @format_resource_atts ||= ActionView::Base.sanitized_allowed_attributes.to_a + ['colspan', 'rowspan']

  simple_format(sanitize(value.to_s, tags: @format_resource_tags, attributes: @format_resource_atts), {}, sanitize: false)
end