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. --- railties/lib/generators/erb/scaffold/templates/show.html.erb | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 railties/lib/generators/erb/scaffold/templates/show.html.erb (limited to 'railties/lib/generators/erb/scaffold/templates/show.html.erb') diff --git a/railties/lib/generators/erb/scaffold/templates/show.html.erb b/railties/lib/generators/erb/scaffold/templates/show.html.erb new file mode 100644 index 0000000000..adecaf70c6 --- /dev/null +++ b/railties/lib/generators/erb/scaffold/templates/show.html.erb @@ -0,0 +1,10 @@ +<% for attribute in attributes -%> +

+ <%= attribute.column.human_name %>: + <%%=h @<%= singular_name %>.<%= attribute.name %> %> +

+ +<% end -%> + +<%%= link_to 'Edit', edit_<%= singular_name %>_path(@<%= singular_name %>) %> | +<%%= link_to 'Back', <%= plural_name %>_path %> \ No newline at end of file -- cgit v1.2.3 From 1a4d8aca8a675aa02cead4b1db53ba5a3f9aa326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Wed, 1 Jul 2009 20:12:29 +0200 Subject: Added tests to scaffold controller. --- railties/lib/generators/erb/scaffold/templates/show.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'railties/lib/generators/erb/scaffold/templates/show.html.erb') diff --git a/railties/lib/generators/erb/scaffold/templates/show.html.erb b/railties/lib/generators/erb/scaffold/templates/show.html.erb index adecaf70c6..25567957be 100644 --- a/railties/lib/generators/erb/scaffold/templates/show.html.erb +++ b/railties/lib/generators/erb/scaffold/templates/show.html.erb @@ -1,10 +1,10 @@ <% for attribute in attributes -%>

- <%= attribute.column.human_name %>: + <%= attribute.human_name %>: <%%=h @<%= singular_name %>.<%= attribute.name %> %>

<% end -%> <%%= link_to 'Edit', edit_<%= singular_name %>_path(@<%= singular_name %>) %> | -<%%= link_to 'Back', <%= plural_name %>_path %> \ No newline at end of file +<%%= link_to 'Back', <%= plural_name %>_path %> -- cgit v1.2.3