From 573855951ca13ebf5348372858ae0505b8a4f2cb Mon Sep 17 00:00:00 2001 From: Patricio Mac Adden Date: Mon, 20 Jan 2025 12:14:05 -0300 Subject: [PATCH] improve partial: correct use of tags + attachment links styling --- .../tailwindcss/scaffold/templates/partial.html.erb.tt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/generators/tailwindcss/scaffold/templates/partial.html.erb.tt b/lib/generators/tailwindcss/scaffold/templates/partial.html.erb.tt index 88dc3eda..ed89fc34 100644 --- a/lib/generators/tailwindcss/scaffold/templates/partial.html.erb.tt +++ b/lib/generators/tailwindcss/scaffold/templates/partial.html.erb.tt @@ -1,16 +1,16 @@ -
+
<% attributes.reject(&:password_digest?).each do |attribute| -%> -

+

<%= attribute.human_name %>: <% if attribute.attachment? -%> - <%%= link_to <%= singular_name %>.<%= attribute.column_name %>.filename, <%= singular_name %>.<%= attribute.column_name %> if <%= singular_name %>.<%= attribute.column_name %>.attached? %> + <%%= link_to <%= singular_name %>.<%= attribute.column_name %>.filename, <%= singular_name %>.<%= attribute.column_name %>, class: "text-gray-700 underline hover:no-underline" if <%= singular_name %>.<%= attribute.column_name %>.attached? %> <% elsif attribute.attachments? -%> <%% <%= singular_name %>.<%= attribute.column_name %>.each do |<%= attribute.singular_name %>| %> -
<%%= link_to <%= attribute.singular_name %>.filename, <%= attribute.singular_name %> %>
+
<%%= link_to <%= attribute.singular_name %>.filename, <%= attribute.singular_name %>, class: "text-gray-700 underline hover:no-underline" %>
<%% end %> <% else -%> <%%= <%= singular_name %>.<%= attribute.column_name %> %> <% end -%> -

+
<% end -%>