From 80cd16372ce1776e5d6af87b2dc7be8205fa1513 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Wed, 1 Jul 2009 18:33:22 +0200 Subject: Added scaffold views to scaffold controller. --- .../erb/scaffold/templates/index.html.erb | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 railties/lib/generators/erb/scaffold/templates/index.html.erb (limited to 'railties/lib/generators/erb/scaffold/templates/index.html.erb') diff --git a/railties/lib/generators/erb/scaffold/templates/index.html.erb b/railties/lib/generators/erb/scaffold/templates/index.html.erb new file mode 100644 index 0000000000..427ff81e03 --- /dev/null +++ b/railties/lib/generators/erb/scaffold/templates/index.html.erb @@ -0,0 +1,24 @@ +

Listing <%= plural_name %>

+ + + +<% for attribute in attributes -%> + +<% end -%> + + +<%% @<%= plural_name %>.each do |<%= singular_name %>| %> + +<% for attribute in attributes -%> + +<% end -%> + + + + +<%% end %> +
<%= attribute.human_name %>
<%%=h <%= singular_name %>.<%= attribute.name %> %><%%= link_to 'Show', <%= singular_name %> %><%%= link_to 'Edit', edit_<%= singular_name %>_path(<%= singular_name %>) %><%%= link_to 'Destroy', <%= singular_name %>, :confirm => 'Are you sure?', :method => :delete %>
+ +
+ +<%%= link_to 'New <%= singular_name %>', new_<%= singular_name %>_path %> -- cgit v1.2.3