Sha256: 4425ec97a943827dae85b49bb811cde088549d7a4cf80b4b76a9166f456518e5

Contents?: true

Size: 649 Bytes

Versions: 13

Compression:

Stored size: 649 Bytes

Contents

<%#
# HasMany Index Partial

This partial renders a has_many relationship,
to be displayed on a resource's index page.

By default, the relationship is rendered
as a count of how many objects are associated through the relationship.

## Local variables:

- `field`:
  An instance of [Administrate::Field::HasMany][1].
  A wrapper around the has_many relationship pulled from the database.

[1]: http://www.rubydoc.info/gems/administrate/Administrate/Field/HasMany
%>

<%= pluralize(field.data.size, t("activerecord.models.#{field.attribute.to_s.singularize}", default: field.attribute.to_s.humanize.downcase.singularize, count: field.data.size)) %>

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
administrate-1.0.0.beta3 app/views/fields/has_many/_index.html.erb
administrate_tailwind_theme-0.0.6 app/views/fields/has_many/_index.html.erb
administrate-1.0.0.beta2 app/views/fields/has_many/_index.html.erb
administrate-1.0.0.beta1 app/views/fields/has_many/_index.html.erb
administrate_tailwind_theme-0.0.5 app/views/fields/has_many/_index.html.erb
administrate_tailwind_theme-0.0.4 app/views/fields/has_many/_index.html.erb
administrate_tailwind_theme-0.0.3 app/views/fields/has_many/_index.html.erb
administrate_tailwind_theme-0.0.2 app/views/fields/has_many/_index.html.erb
administrate_tailwind_theme-0.0.1 app/views/fields/has_many/_index.html.erb
administrate-0.20.1 app/views/fields/has_many/_index.html.erb
administrate-0.20.0 app/views/fields/has_many/_index.html.erb
administrate-0.19.0 app/views/fields/has_many/_index.html.erb
administrate-0.18.0 app/views/fields/has_many/_index.html.erb