You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -963,7 +963,7 @@ end
963
963
964
964
> **What's Going On Here?**
965
965
>
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.
967
967
> - 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.
968
968
> - 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.
969
969
> - 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