def render_diff_value(value, type, action, options = {})
      return "".html_safe if value.blank?

      value_to_render = case type
                        when :date
                          l value, format: :long
                        when :percentage
                          number_to_percentage value, precision: 2
                        else
                          value
                        end

      content_tag(:div, class: "card--list__item #{action}") do
        content_tag(:div, class: "card--list__text") do
          content_tag(:div, { class: "diff__value" }.merge(options)) do
            value_to_render
          end
        end
      end
    end
def render_diff_value(value, type, action, options = {})
      return "".html_safe if value.blank?

      value_to_render = case type
                        when :date
                          l value, format: :long
                        when :percentage
                          number_to_percentage value, precision: 2
                        else
                          value
                        end

      content_tag(:div, class: "card--list__item #{action}") do
        content_tag(:div, class: "card--list__text") do
          content_tag(:div, { class: "diff__value" }.merge(options)) do
            value_to_render
          end
        end
      end
    end
Renders the given value in a user-friendly way based on the value class.

 value - an object to be rendered

 Returns an HTML-ready String.