Sha256: fbe8f79d72b745d583c6ee7b45d5e342792cd883151646c6e68b06b595f4965d
Contents?: true
Size: 917 Bytes
Versions: 3
Compression:
Stored size: 917 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(params[field.name]) ) %> <% if field.more_than_limit? %> <%= paginate field.resources(params[field.name]), param_name: "#{field.name}" %> <% end %> <% else %> <%= t("administrate.fields.has_many.none", default: "–") %> <% end %>
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
administrate-0.7.0 | app/views/fields/has_many/_show.html.erb |
administrate-0.6.0 | app/views/fields/has_many/_show.html.erb |
administrate-0.5.0 | app/views/fields/has_many/_show.html.erb |