diff --git a/app/controllers/password_resets_controller.rb b/app/controllers/password_resets_controller.rb index 70e5487..30489d7 100644 --- a/app/controllers/password_resets_controller.rb +++ b/app/controllers/password_resets_controller.rb @@ -1,7 +1,7 @@ class PasswordResetsController < ApplicationController - before_action :get_user, only: [:edit, :update] - before_action :valid_user, only: [:edit, :update] - before_action :check_expiration, only: [:edit, :update] + before_action :get_user, only: [ :edit, :update ] + before_action :valid_user, only: [ :edit, :update ] + before_action :check_expiration, only: [ :edit, :update ] include SessionsHelper def new @@ -16,7 +16,7 @@ class PasswordResetsController < ApplicationController redirect_to root_url else flash.now[:danger] = "Email not found" - render 'new', status: :unprocessable_entity + render "new", status: :unprocessable_entity end end @@ -26,7 +26,7 @@ class PasswordResetsController < ApplicationController def update if params[:user][:password].empty? @user.errors.add(:password, "can't be empty") - render 'edit', status: :unprocessable_entity + render "edit", status: :unprocessable_entity elsif @user.update(user_params) forget(@user) reset_session @@ -35,7 +35,7 @@ class PasswordResetsController < ApplicationController flash[:success] = "Password has been reset" redirect_to @user else - render 'edit', status: :unprocessable_entity + render "edit", status: :unprocessable_entity end end