Skip to content

Commit 33535ea

Browse files
committed
Minor amendments to make what's going on clearer
1 parent 8f9c9eb commit 33535ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/posts/finishing-touches-for-forms.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ When a form submission results in a validation failure we need to make it clear
6666
6767
This is a little tricky because we need some logic that can determine whether there's an error on the page, and we set the `<title>` in the document `<head>` before we've rendered the form in the `<body>`.
6868

69-
We can use `content_for` to our advantage here too to place the title where we need it.
69+
We can use `content_for` here too to place the title where we need it.
7070

7171
```html
7272
<head>
@@ -75,7 +75,7 @@ We can use `content_for` to our advantage here too to place the title where we n
7575
</head>
7676
```
7777

78-
We can use the [GOV.UK Components](https://govuk-components.netlify.app/) [title with error prefix helper](https://govuk-components.netlify.app/helpers/title-with-error-prefix/) to add the 'Error:' prefix whenever `@object.errors.any?` is `true`.
78+
We can use the [GOV.UK Components](https://govuk-components.netlify.app/) [title with error prefix helper](https://govuk-components.netlify.app/helpers/title-with-error-prefix/) to add the 'Error:' prefix whenever `@object.errors.any?` is `true`, and pass the resulting string into the `page_title` content:
7979

8080
```ruby
8181
<%

0 commit comments

Comments
 (0)