Skip to content

Commit ef2b653

Browse files
committed
Fix typos in 'link_to' and 'escape_javascript' examples
- Corrected the output URL in the 'link_to' example to match the input URL. - Changed the file extension in the 'escape_javascript' section from `.html.rb` to `.html.erb`.
1 parent 1a36a4a commit ef2b653

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

guides/source/action_view_helpers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ link_to "Profiles", profiles_path
302302
# => <a href="/profiles">Profiles</a>
303303

304304
link_to nil, "https://example.com"
305-
# => <a href="https://www.example.com">https://www.example.com</a>
305+
# => <a href="https://example.com">https://example.com</a>
306306

307307
link_to "Articles", articles_path, id: "articles", class: "article__container"
308308
# => <a href="/articles" class="article__container" id="articles">Articles</a>
@@ -688,7 +688,7 @@ For example, if you have a partial with a greeting that contains double quotes,
688688
you can escape the greeting to use in a JavaScript alert.
689689

690690
```html+erb
691-
<%# app/views/users/greeting.html.rb %>
691+
<%# app/views/users/greeting.html.erb %>
692692
My name is <%= current_user.name %>, and I'm here to say "Welcome to our website!"
693693
```
694694

0 commit comments

Comments
 (0)