Premium Content - Free Preview
/rails/info/routes to see the new paths that Devise created. Here are the paths Devise created for signing up, signing in and signing out:
|Path Helper||HTTP Verb||Path||Controller#Action|
Every web request (such as going to products/3) has an HTTP verb (or "method") associated with it, which explains the action the user wants to perform. The most common verb is GET, to get a web page or file without changing anything. As you can see above, there are other HTTP verbs; here's what each request is for:
- POST - create a resource, such as a new user or product
- GET - display a resource on a site, such as a product information
- PUT - update a resource (we don't need that yet)
- DELETE - delete a resource, such as a user or product
As mentioned in Standard Resources, Rails provides a standard way to map URLs to actions. These 4 HTTP actions correspond to the 4 standard CRUD operations - Create, Read, Update, Delete. Rails helps you create standardized routes where each requests uses the appropriate verb. When your routes follow this standardized format, they are called RESTful resources.
End of Free Content Preview. Please Sign in or Sign up to buy premium content.