Skip to content

Commit ad98417

Browse files
committed
Simplify index page edit button to use edit_helper
1 parent dc8251d commit ad98417

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/generators/tailwindcss/scaffold/templates/index.html.erb.tt

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<%%= render <%= singular_table_name %> %>
1818
<div class="space-x-2">
1919
<%%= link_to "Show", <%= model_resource_name(singular_table_name) %>, class: "rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
20-
<%%= link_to "Edit", edit_<%= singular_route_name %>_path(<%= singular_table_name %>), class: "rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
20+
<%%= link_to "Edit", <%= edit_helper(singular_table_name, type: :path) %>, class: "rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
2121
<div class="inline-block">
2222
<%%= button_to "Destroy", <%= model_resource_name %>, method: :delete, class: "rounded-md px-3.5 py-2.5 text-white bg-red-600 hover:bg-red-500 font-medium" %>
2323
</div>

0 commit comments

Comments
 (0)