From 6d87cd028b32570973450424db164e5405a0ee13 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sat, 17 Mar 2012 08:32:49 -0700 Subject: moves the guides up to the root directory --- .../getting_started/app/views/comments/_comment.html.erb | 15 +++++++++++++++ .../getting_started/app/views/comments/_form.html.erb | 13 +++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 guides/code/getting_started/app/views/comments/_comment.html.erb create mode 100644 guides/code/getting_started/app/views/comments/_form.html.erb (limited to 'guides/code/getting_started/app/views/comments') diff --git a/guides/code/getting_started/app/views/comments/_comment.html.erb b/guides/code/getting_started/app/views/comments/_comment.html.erb new file mode 100644 index 0000000000..4c3fbf26cd --- /dev/null +++ b/guides/code/getting_started/app/views/comments/_comment.html.erb @@ -0,0 +1,15 @@ +

+ Commenter: + <%= comment.commenter %> +

+ +

+ Comment: + <%= comment.body %> +

+ +

+ <%= link_to 'Destroy Comment', [comment.post, comment], + :confirm => 'Are you sure?', + :method => :delete %> +

diff --git a/guides/code/getting_started/app/views/comments/_form.html.erb b/guides/code/getting_started/app/views/comments/_form.html.erb new file mode 100644 index 0000000000..d15bdd6b59 --- /dev/null +++ b/guides/code/getting_started/app/views/comments/_form.html.erb @@ -0,0 +1,13 @@ +<%= form_for([@post, @post.comments.build]) do |f| %> +
+ <%= f.label :commenter %>
+ <%= f.text_field :commenter %> +
+
+ <%= f.label :body %>
+ <%= f.text_area :body %> +
+
+ <%= f.submit %> +
+<% end %> -- cgit v1.2.3