Skip to content

Commit

Permalink
Remove section about mailer paths
Browse files Browse the repository at this point in the history
I think this advice doesn't belong in the style guide.

Using _path instead of _url is simply a bug, it's not a matter of style
or preference.
  • Loading branch information
andyw8 authored and bbatsov committed Apr 23, 2019
1 parent bde0f05 commit cf96230
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1327,22 +1327,6 @@ your application.
default_url_options[:host] = 'your_site.com'
```
* <a name="url-not-path-in-email"></a>
If you need to use a link to your site in an email, always use the `_url`, not
`_path` methods. The `_url` methods include the host name and the `_path`
methods don't.
<sup>[[link](#url-not-path-in-email)]</sup>

```ruby
# bad
You can always find more info about this course
<%= link_to 'here', course_path(@course) %>
# good
You can always find more info about this course
<%= link_to 'here', course_url(@course) %>
```

* <a name="email-addresses"></a>
Format the from and to addresses properly. Use the following format:
<sup>[[link](#email-addresses)]</sup>
Expand Down

0 comments on commit cf96230

Please sign in to comment.