From 8dd76a7a6ff1bb7105beabb8f834ca54ab1e5fc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Mon, 13 Nov 2017 15:23:28 -0500 Subject: Use .tt extension to all the template files Make clear that the files are not to be run for interpreters. Fixes #23847. Fixes #30690. Closes #23878. --- .../erb/scaffold/templates/index.html.erb.tt | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 railties/lib/rails/generators/erb/scaffold/templates/index.html.erb.tt (limited to 'railties/lib/rails/generators/erb/scaffold/templates/index.html.erb.tt') diff --git a/railties/lib/rails/generators/erb/scaffold/templates/index.html.erb.tt b/railties/lib/rails/generators/erb/scaffold/templates/index.html.erb.tt new file mode 100644 index 0000000000..e1ede7c713 --- /dev/null +++ b/railties/lib/rails/generators/erb/scaffold/templates/index.html.erb.tt @@ -0,0 +1,31 @@ +

<%%= notice %>

+ +

<%= plural_table_name.titleize %>

+ + + + +<% attributes.reject(&:password_digest?).each do |attribute| -%> + +<% end -%> + + + + + + <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %> + +<% attributes.reject(&:password_digest?).each do |attribute| -%> + +<% end -%> + + + + + <%% end %> + +
<%= attribute.human_name %>
<%%= <%= singular_table_name %>.<%= attribute.name %> %><%%= link_to 'Show', <%= model_resource_name %> %><%%= link_to 'Edit', edit_<%= singular_route_name %>_path(<%= singular_table_name %>) %><%%= link_to 'Destroy', <%= model_resource_name %>, method: :delete, data: { confirm: 'Are you sure?' } %>
+ +
+ +<%%= link_to 'New <%= singular_table_name.titleize %>', new_<%= singular_route_name %>_path %> -- cgit v1.2.3