Skip to content

Commit

Permalink
Fix notes on Step 12 to reference the correct method
Browse files Browse the repository at this point in the history
Step 12 adds the `authenticate_user!` method to the `users_controller` but the notes reference `redirect_if_authenticated`.
  • Loading branch information
thomascchen authored and stevepolitodesign committed Feb 5, 2022
1 parent 152e986 commit fd79127
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ end

> **What's Going On Here?**
>
> - We call `redirect_if_authenticated` before editing, destroying, or updating a user since only an authenticated user should be able to do this.
> - We call `authenticate_user!` before editing, destroying, or updating a user since only an authenticated user should be able to do this.
> - We update the `create` method to accept `create_user_params` (formerly `user_params`). This is because we're going to require different parameters for creating an account vs. editing an account.
> - The `destroy` action simply deletes the user and logs them out. Note that we're calling `current_user`, so this action can only be scoped to the user who is logged in.
> - The `edit` action simply assigns `@user` to the `current_user` so that we have access to the user in the edit form.
Expand Down

0 comments on commit fd79127

Please sign in to comment.