<%# @param object [model] model instance %> <%# @param field_name [String] name of the field %> <%# @param value [Object] value of the field %> <%# @param metadata [Hash] metadata of the field %> <%= if value.nil? null else max = metadata[:max] || default_metadata.max value = value.to_s if value.length > max concat content_tag(:span, value.truncate(max)) imodal metadata[:label], value else value end end %>