Skip to content

Commit f76835c

Browse files
Fix rails#54009 getting_started.md doc
1 parent c67d91b commit f76835c

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

guides/source/getting_started.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -773,24 +773,22 @@ get "/blog/:title", to: "blog#show"
773773
Rails will capture `hello-world` out of `/blog/hello-world` and this can be used
774774
to look up the blog post with the matching title.
775775

776-
777-
```ruby
778-
get "/blog/:slug", to: "blog#show"
779-
```
780-
781776
#### CRUD Routes
782777

783778
There are 4 common actions you will generally need for a resource: Create, Read,
784-
Update, Delete (CRUD). This translates to 7 typical routes:
779+
Update, Delete (CRUD). This translates to 8 typical routes:
785780

786781
* Index - Shows all the records
787782
* New - Renders a form for creating a new record
788783
* Create - Processes the new form submission, handling errors and creating the
789784
record
790785
* Show - Renders a specific record for viewing
791786
* Edit - Renders a form for updating a specific record
792-
* Update - Handles the edit form submission, handling errors and updating the
793-
record
787+
* Update (entire resource) - Handles the form submission to update the entire resource.
788+
This is typically triggered by a PUT request, replacing all attributes of the resource.
789+
* Update (specific attributes only) - Handles the form submission to update specific
790+
attributes of the resource. This is typically triggered by a PATCH request,
791+
making partial updates to the resource.
794792
* Destroy - Handles deleting a specific record
795793

796794
We can add routes for these CRUD actions with the following:

0 commit comments

Comments
 (0)