Skip to content

Commit 8310f63

Browse files
committed
revert helper to work with rails 6.1
1 parent 6ef7a08 commit 8310f63

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33

44
<%%= render "form", <%= singular_table_name %>: @<%= singular_table_name %> %>
55

6-
<%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper(type: :path) %>, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
6+
<%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper %>_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
77
</div>

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<%%= render @<%= singular_table_name %> %>
88

9-
<%%= link_to "Edit this <%= human_name.downcase %>", <%= edit_helper(type: :path) %>, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
9+
<%%= link_to "Edit this <%= human_name.downcase %>", edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
1010
<%%= link_to "Back to <%= human_name.pluralize.downcase %>", <%= index_helper %>_path, class: "ml-2 rounded-lg py-3 px-5 bg-gray-100 inline-block font-medium" %>
1111
<div class="inline-block ml-2">
1212
<%%= button_to "Destroy this <%= human_name.downcase %>", <%= model_resource_name(prefix: "@") %>, method: :delete, class: "mt-2 rounded-lg py-3 px-5 bg-gray-100 font-medium" %>

0 commit comments

Comments
 (0)