Sha256: 51b852adec48e93db8a3ef0b381b08fd0753e1060cd93d98e029fb7e34e59dae
Contents?: true
Size: 930 Bytes
Versions: 8
Compression:
Stored size: 930 Bytes
Contents
export default function <%= inertia_component_name %>({ <%= singular_table_name %> }) { return ( <div> <% attributes.reject(&:password_digest?).each do |attribute| -%> <p className="my-5"> <strong className="block font-medium mb-1"><%= attribute.human_name %>:</strong> <% if attribute.attachment? -%> {<%= singular_table_name %>.<%= attribute.column_name %> && ( <a href={<%= singular_table_name %>.<%= attribute.column_name %>.url}>{<%= singular_table_name %>.<%= attribute.column_name %>.filename}</a> )} </p> <% elsif attribute.attachments? -%> </p> {<%= singular_table_name %>.<%= attribute.column_name %>.map((file, i) => ( <div key={i}> <a href={file.url}>{file.filename}</a> </div> ))} <% else -%> {<%= singular_table_name %>.<%= attribute.column_name %>?.toString()} </p> <% end -%> <% end -%> </div> ) }
Version data entries
8 entries across 8 versions & 2 rubygems