thoughtbot/guides — pull request #232 by sgrif (2014-09-23 23:43:50+00:00)
Title: Include `href` or `to_param` when constructing URLs client side

One nice feature that Rails provides is easy changes to URL generation
(assuming the param starts with the ID). All you have to do is

```ruby
def to_param
[id, name].to_param
end
```

and everything "Just Works". This is lost, however, if you're manually
constructing URLs on the client side. This is avoided, if as a general
rule of thumb, we let the server decide how to construct the URLs, and
pass that information along.