Skip to content

Commit 6ac8d8e

Browse files
authored
Merge pull request rails#54014 from mohsen-alizadeh/issue-54009
Fix rails#54009 getting_started.md doc
2 parents 79458f4 + 7388f67 commit 6ac8d8e

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

guides/source/getting_started.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -773,24 +773,19 @@ 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 (full) - Handles the edit form submission, handling errors and updating the entire record, and typically triggered by a PUT request.
788+
* Update (partial) - Handles the edit form submission, handling errors and updating specific attributes of the record, and typically triggered by a PATCH request.
794789
* Destroy - Handles deleting a specific record
795790

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

0 commit comments

Comments
 (0)