aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/engines.md
diff options
context:
space:
mode:
authorYoshiyuki Hirano <yhirano@me.com>2017-10-09 10:11:03 +0900
committerYoshiyuki Hirano <yhirano@me.com>2017-10-09 11:36:37 +0900
commit639fded77b5797b7770c99a76a40c141cc95c178 (patch)
tree7e6733b50c803abaa4dcabcb48458de9a49c231e /guides/source/engines.md
parent142831159c0d72c7bf2e23a35bfdbdccd8b5a931 (diff)
downloadrails-639fded77b5797b7770c99a76a40c141cc95c178.tar.gz
rails-639fded77b5797b7770c99a76a40c141cc95c178.tar.bz2
rails-639fded77b5797b7770c99a76a40c141cc95c178.zip
Use `form_with` instead of `form_for` in engine guide [ci skip]
Diffstat (limited to 'guides/source/engines.md')
-rw-r--r--guides/source/engines.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/guides/source/engines.md b/guides/source/engines.md
index 738de5d588..9f39832a7e 100644
--- a/guides/source/engines.md
+++ b/guides/source/engines.md
@@ -537,12 +537,12 @@ directory at `app/views/blorgh/comments` and in it a new file called
```html+erb
<h3>New comment</h3>
-<%= form_for [@article, @article.comments.build] do |f| %>
+<%= form_with(model: [@article, @article.comments.build], local: true) do |form| %>
<p>
- <%= f.label :text %><br>
- <%= f.text_area :text %>
+ <%= form.label :text %><br>
+ <%= form.text_area :text %>
</p>
- <%= f.submit %>
+ <%= form.submit %>
<% end %>
```
@@ -783,8 +783,8 @@ added above the `title` field with this code:
```html+erb
<div class="field">
- <%= f.label :author_name %><br>
- <%= f.text_field :author_name %>
+ <%= form.label :author_name %><br>
+ <%= form.text_field :author_name %>
</div>
```