Skip to content

Commit 049d1af

Browse files
authored
Merge pull request rails#54706 from porporpor020202/fix-form-with-docs
[ci skip] docs: Fix form_with model binding example in guides rails#54616
2 parents 3720ca0 + feb4058 commit 049d1af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

guides/source/form_helpers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,8 @@ The `form_with` helper has a `:model` option that allows you to bind the form bu
249249
For example, if we have a `@book` model object:
250250

251251
```ruby
252-
@book = Book.find(42)
253-
# => #<Book id: 42, title: "Walden", author: "Henry David Thoreau">
252+
@book = Book.new
253+
# => #<Book id: nil, title: nil, author: nil>
254254
```
255255

256256
And the following form to create a new book:

0 commit comments

Comments
 (0)