Sha256: cef7897d9cdac5452940bdb3d3d6d1a19653fdc286f76caec97537ec83e92a8c
Contents?: true
Size: 977 Bytes
Versions: 1
Compression:
Stored size: 977 Bytes
Contents
<%# # HasMany Show Partial This partial renders a has_many relationship, to be displayed on a resource's show page. By default, the relationship is rendered as a table of the first few associated resources. The columns of the table are taken from the associated resource class's dashboard. ## Local variables: - `field`: An instance of [Administrate::Field::HasMany][1]. Contains methods to help display a table of associated resources. [1]: http://www.rubydoc.info/gems/administrate/Administrate/Field/HasMany %> <% if field.resources.any? %> <%= render( "collection", collection_presenter: field.associated_collection, resources: field.resources ) %> <% if field.more_than_limit? %> <span> <%= t( 'administrate.fields.has_many.more', count: field.limit, total_count: field.data.count(:all), ) %> </span> <% end %> <% else %> <%= t("administrate.fields.has_many.none", default: "–") %> <% end %>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
administrate-0.4.0 | app/views/fields/has_many/_show.html.erb |