Sha256: 88ce7a9596597fed7648430b47c16488ed0a98f3dbfe85bb48778740d8d38571

Contents?: true

Size: 647 Bytes

Versions: 2

Compression:

Stored size: 647 Bytes

Contents

<%#
# Hyperlink Index Partial

This partial renders a hyperlink attribute
to be displayed on a resource's index page.

By default, the attribute is rendered as a hyperlink to the data with the truncated string as label.

## Local variables:

- `field`:
  An instance of [Administrate::Field::Hyperlink][1].
  A wrapper around the [Administrate::Field::String][2] field.

[1]: http://www.rubydoc.info/gems/administrate-field-hyperlink/Administrate/Field/Hyperlink
[2]: http://www.rubydoc.info/gems/administrate/Administrate/Field/String
%>

<%= link_to field.truncate, field.href, target: '_blank', rel: 'noopener noreferrer' %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
administrate-field-hyperlink-0.2.0 app/views/fields/hyperlink/_index.html.erb
administrate-field-hyperlink-0.1.0 app/views/fields/hyperlink/_index.html.erb