Skip to content

Commit fd79127

Browse files
thomascchenstevepolitodesign
authored andcommitted
Fix notes on Step 12 to reference the correct method
Step 12 adds the `authenticate_user!` method to the `users_controller` but the notes reference `redirect_if_authenticated`.
1 parent 152e986 commit fd79127

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@ end
963963

964964
> **What's Going On Here?**
965965
>
966-
> - We call `redirect_if_authenticated` before editing, destroying, or updating a user since only an authenticated user should be able to do this.
966+
> - We call `authenticate_user!` before editing, destroying, or updating a user since only an authenticated user should be able to do this.
967967
> - 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.
968968
> - 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.
969969
> - The `edit` action simply assigns `@user` to the `current_user` so that we have access to the user in the edit form.

0 commit comments

Comments
 (0)