diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md index 472eb3018063b..09812baf37097 100644 --- a/guides/source/getting_started.md +++ b/guides/source/getting_started.md @@ -1917,12 +1917,12 @@ Our blog has <%= Article.public_count %> articles and counting! <%= link_to "New Article", new_article_path %> ``` -To finish up, we will add a select box to the forms, and let the user select the status when they create a new article or post a new comment. We can also specify the default status as `public`. In `app/views/articles/_form.html.erb`, we can add: +To finish up, we will add a select box to the forms, and let the user select the status when they create a new article or post a new comment. We can also select the status of the object, or a default of `public` if it hasn't been set yet. In `app/views/articles/_form.html.erb`, we can add: ```html+erb
<%= form.label :status %>
- <%= form.select :status, ['public', 'private', 'archived'], selected: 'public' %> + <%= form.select :status, ['public', 'private', 'archived'], selected: article.status || 'public' %>
```