Sha256: 2e37668bca71f4f8189374c1904dbbdc7184e4cbe7af5704d06a9facb5c09260
Contents?: true
Size: 826 Bytes
Versions: 6
Compression:
Stored size: 826 Bytes
Contents
<%# # LazyBelongsTo Index Partial This partial renders a belongs_to relationship, to be displayed on a resource's index page. By default, the relationship is rendered as a link to the associated object. ## Local variables: - `field`: An instance of [Administrate::Field::LazyBelongsTo][1]. A wrapper around the [Administrate::Field::BelongsTo][2] field [1]: http://www.rubydoc.info/gems/administrate-field-lazy_belongs_to/Administrate/Field/LazyBelongsTo [2]: 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
6 entries across 6 versions & 1 rubygems