Skip to content

Commit abea8c0

Browse files
authored
Merge pull request #523 from patriciomacadden/simplify-markup
Simplify markup
2 parents d140213 + 11e7c3d commit abea8c0

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

Diff for: lib/generators/tailwindcss/scaffold/templates/index.html.erb.tt

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
<div class="w-full sm:w-auto flex flex-col sm:flex-row space-x-2 space-y-2">
1919
<%%= link_to "Show", <%= model_resource_name(singular_table_name) %>, class: "w-full sm:w-auto text-center rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
2020
<%%= link_to "Edit", <%= edit_helper(singular_table_name, type: :path) %>, class: "w-full sm:w-auto text-center rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
21-
<div class="sm:inline-block">
22-
<%%= button_to "Destroy", <%= model_resource_name %>, method: :delete, class: "w-full sm:w-auto rounded-md px-3.5 py-2.5 text-white bg-red-600 hover:bg-red-500 font-medium cursor-pointer", data: { turbo_confirm: "Are you sure?" } %>
23-
</div>
21+
<%%= button_to "Destroy", <%= model_resource_name %>, method: :delete, class: "w-full sm:w-auto rounded-md px-3.5 py-2.5 text-white bg-red-600 hover:bg-red-500 font-medium cursor-pointer", data: { turbo_confirm: "Are you sure?" } %>
2422
</div>
2523
</div>
2624
<%% end %>

Diff for: lib/generators/tailwindcss/scaffold/templates/show.html.erb.tt

+1-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,5 @@
1111

1212
<%%= link_to "Edit this <%= human_name.downcase %>", <%= edit_helper(type: :path) %>, class: "w-full sm:w-auto text-center rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
1313
<%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper %>_path, class: "w-full sm:w-auto text-center mt-2 sm:mt-0 sm:ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
14-
<div class="sm:inline-block mt-2 sm:mt-0 sm:ml-2">
15-
<%%= button_to "Destroy this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, method: :delete, class: "w-full rounded-md px-3.5 py-2.5 text-white bg-red-600 hover:bg-red-500 font-medium cursor-pointer", data: { turbo_confirm: "Are you sure?" } %>
16-
</div>
14+
<%%= button_to "Destroy this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, method: :delete, form_class: "sm:inline-block mt-2 sm:mt-0 sm:ml-2", class: "w-full rounded-md px-3.5 py-2.5 text-white bg-red-600 hover:bg-red-500 font-medium cursor-pointer", data: { turbo_confirm: "Are you sure?" } %>
1715
</div>

0 commit comments

Comments
 (0)