Sha256: f6b59f15e23e1ff6d05cccd406a0ff6bc7422cf04381e5b63c9d404eb27f48cc
Contents?: true
Size: 737 Bytes
Versions: 91
Compression:
Stored size: 737 Bytes
Contents
<% object ||= current_attributes_object %> <% strategy ||= current_attributes_strategy || :none %> <% url ||= nil %> <% if object.public_send(attribute).present? %> <%= render 'shared/attributes/attribute', object: object, attribute: attribute, strategy: strategy, url: url do %> <% # Here we manually add a trix-content class since sanitizing the body removes the Rails default. %> <% if object.send(attribute).is_a?(ActionText::RichText) %> <%= tag.div(html_sanitize(object.public_send(attribute).body.to_trix_html).html_safe, class:"trix-content") %> <% else %> <% # `.to_s` is for action text. %> <%= html_sanitize(object.public_send(attribute).to_s).html_safe %> <% end %> <% end %> <% end %>
Version data entries
91 entries across 91 versions & 1 rubygems