Sha256: 0ec0157eb73f8baf9ced99787ad46774391834301a7c8598b51fe03ab465309e
Contents?: true
Size: 702 Bytes
Versions: 1
Compression:
Stored size: 702 Bytes
Contents
<%# # Enum Show Partial This partial renders an enum attribute, to be displayed on a resource's show page. By default, the attribute is rendered as a text tag. ## Local variables: - `field`: An instance of [Administrate::Field::Enum][1]. A wrapper around the enum attributes pulled from the model. %> <% if data.kind_of?(Hash) %> <table> <tbody> <% data.each do |key, value| %> <tr> <td><%= key %></td> <td><%= if value.blank? then "-" else render partial: '/fields/jsontable/json_table_field', locals: { data: value } end %></td> </tr> <% end %> <tbody> </table> <% else %> <%= if data.blank? then "-" else data end %> <% end %>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
administrate-field-jsontable-0.1.0 | app/views/fields/jsontable/_json_table_field.html.erb |