Resources

In HTTP a “resource” is something that is identified by a URL.

In Rails a “resource” is something slightly different: a collection of 7 routes that belong together in the sense that they allow listing, viewing, and managing a collection of things. It is, essentially, a convention of grouping routes, which has been encoded in Rails, but also is being used in other applications, and generally a great practice.

Let’s have a look at an example.