fix gl accounts unable to update settings

This commit is contained in:
Joshua Arts 2018-07-13 10:21:32 -04:00
parent 8089decc17
commit a6b05f5fd3
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ class UsersController < ApplicationController
end end
if errors.empty? && @user.save 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." redirect_to edit_user_path(@user), notice: "Information successfully updated."
else else
# Append custom errors. # Append custom errors.

View File

@ -14,7 +14,7 @@ class User < ApplicationRecord
uniqueness: { case_sensitive: false }, uniqueness: { case_sensitive: false },
format: { with: /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i } 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. # We don't want to require password validations on all accounts.
has_secure_password(validations: false) has_secure_password(validations: false)