Module: Eventsimple::EntitiesHelper
- Defined in:
- app/helpers/eventsimple/entities_helper.rb
Instance Method Summary collapse
Instance Method Details
#render_value(value) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'app/helpers/eventsimple/entities_helper.rb', line 5 def render_value(value) case value when nil content_tag(:code, '-', class: 'entity-property') when Hash, Array content_tag(:div, '', class: 'json-viewer-target', data: { json: value.to_json }) else content_tag(:code, value.to_s, class: 'entity-property') end end |