Sha256: 8e388aba5eefcc5d3790c6caed65429c0caec3c068262028edd5e52ba42e38f3

Contents?: true

Size: 1.06 KB

Versions: 2

Compression:

Stored size: 1.06 KB

Contents

<%%= turbo_frame_tag <%= singular_table_name %> do %>
  <div>
    <% attributes.reject(&:password_digest?).each do |attribute| -%>
    <p>
      <strong><%= attribute.human_name %>:</strong>
  <% if attribute.attachment? -%>
      <%%= link_to <%= singular_name %>.<%= attribute.column_name %>.filename, <%= singular_name %>.<%= attribute.column_name %> if <%= singular_name %>.<%= attribute.column_name %>.attached? %>
  <% elsif attribute.attachments? -%>
      <%% <%= singular_name %>.<%= attribute.column_name %>.each do |<%= attribute.singular_name %>| %>
        <div><%%= link_to <%= attribute.singular_name %>.filename, <%= attribute.singular_name %> %></div>
      <%% end %>
  <% else -%>
      <%%= <%= singular_name %>.<%= attribute.column_name %> %>
  <% end -%>
    </p>
    <% end -%>
    <div>
      <%%= link_to "Edit this <%= human_name.downcase %>", edit_<%= model_resource_name %>_path(<%= model_resource_name %>) %> |
      <%%= button_to "Destroy this <%= human_name.downcase %>", <%= model_resource_name %>, method: :delete %>
    </div>
  </div>
  <%% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hotwire_scaffold_generator-1.0.1 lib/generators/hotwire_scaffold/client_controller/templates/views/partial.html.erb.tt
hotwire_scaffold_generator-1.0.0 lib/generators/hotwire_scaffold/client_controller/templates/views/partial.html.erb.tt