diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md index 8046ab51b1d65..58913a03a8aba 100644 --- a/guides/source/getting_started.md +++ b/guides/source/getting_started.md @@ -1703,7 +1703,9 @@ app/controllers/concerns app/models/concerns ``` -A given blog article might have various statuses - for instance, it might be visible to everyone (i.e. `public`), or only visible to the author (i.e. `private`). It may also be hidden to all but still retrievable (i.e. `archived`). Comments may similarly be hidden or visible. This could be represented using a `status` column in each model. +In the example below, we will implement a new feature for our blog that would benefit from using a concern. Then, we will create a concern, and refactor the code to use it, making the code more DRY and maintainable. + +A blog article might have various statuses - for instance, it might be visible to everyone (i.e. `public`), or only visible to the author (i.e. `private`). It may also be hidden to all but still retrievable (i.e. `archived`). Comments may similarly be hidden or visible. This could be represented using a `status` column in each model. First, let's run the following migrations to add `status` to `Articles` and `Comments`: