Sha256: 0171d62f60b27311e9c3cfc0e45a14248d6fa75bd4fdce8f2704abd9d701894f
Contents?: true
Size: 694 Bytes
Versions: 15
Compression:
Stored size: 694 Bytes
Contents
<%# # BelongsTo Show Partial This partial renders a belongs_to 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::BelongsTo][1]. A wrapper around the belongs_to relationship pulled from the database. [1]: http://www.rubydoc.info/gems/administrate/Administrate/Field/BelongsTo %> <% if field.data %> <% if valid_action?(:show, field.associated_class) %> <%= link_to( field.display_associated_resource, [namespace, field.data], ) %> <% else %> <%= field.display_associated_resource %> <% end %> <% end %>
Version data entries
15 entries across 15 versions & 3 rubygems