diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index d231c994..869df464 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -58,7 +58,7 @@ class UsersController < ApplicationController end if errors.empty? && @user.save - # Notify the use that their account has been updated. + # Notify the user that their account has been updated. redirect_to edit_user_path(@user), notice: "Information successfully updated." else # Append custom errors. diff --git a/app/models/user.rb b/app/models/user.rb index 53413b23..c2572e15 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -14,7 +14,7 @@ class User < ApplicationRecord uniqueness: { case_sensitive: false }, format: { with: /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i } - validates :password, length: { minimum: 6 }, confirmation: true, if: :greenlight_account? + validates :password, length: { minimum: 6 }, confirmation: true, if: :greenlight_account?, on: :create # We don't want to require password validations on all accounts. has_secure_password(validations: false)