Sha256: 9a64c5f3c39f70230efcde33b8758dd49a25bad2fe37a98d34aa227d69058499
Contents?: true
Size: 708 Bytes
Versions: 16
Compression:
Stored size: 708 Bytes
Contents
<%# # Polymorphic Show Partial This partial renders a polymorphic relationship, to be displayed on a resource's show page. By default, the relationship is rendered as a link to the associated object. ## Local variables: - `field`: An instance of [Administrate::Field::Polymorphic][1]. A wrapper around the polymorphic belongs_to relationship pulled from the database. [1]: http://www.rubydoc.info/gems/administrate/Administrate/Field/Polymorphic %> <% if field.data %> <% if valid_action?(:show, field.attribute) %> <%= link_to( field.display_associated_resource, [namespace, field.data], ) %> <% else %> <%= field.display_associated_resource %> <% end %> <% end %>
Version data entries
16 entries across 16 versions & 3 rubygems