aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/code/getting_started/app/views/comments/_form.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/guides/code/getting_started/app/views/comments/_form.html.erb')
-rw-r--r--railties/guides/code/getting_started/app/views/comments/_form.html.erb13
1 files changed, 13 insertions, 0 deletions
diff --git a/railties/guides/code/getting_started/app/views/comments/_form.html.erb b/railties/guides/code/getting_started/app/views/comments/_form.html.erb
new file mode 100644
index 0000000000..d15bdd6b59
--- /dev/null
+++ b/railties/guides/code/getting_started/app/views/comments/_form.html.erb
@@ -0,0 +1,13 @@
+<%= form_for([@post, @post.comments.build]) do |f| %>
+ <div class="field">
+ <%= f.label :commenter %><br />
+ <%= f.text_field :commenter %>
+ </div>
+ <div class="field">
+ <%= f.label :body %><br />
+ <%= f.text_area :body %>
+ </div>
+ <div class="actions">
+ <%= f.submit %>
+ </div>
+<% end %>