summaryrefslogtreecommitdiff
path: root/app/validators
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-02-29 17:05:36 -0500
committerRobert Speicher <rspeicher@gmail.com>2016-02-29 17:10:46 -0500
commit128757a7f97b3dc0bf2efd4fac49dc0eaa0af04c (patch)
tree80bed36a8c560bd7828765455d4ca5390dd51b46 /app/validators
parente5276ee6ab24e52740a72582eda188a698584bb3 (diff)
downloadgitlab-ce-rs-fix-user-namespace_uniq.tar.gz
Properly check for a pre-existing error in `User#namespace_uniq`rs-fix-user-namespace_uniq
Rails adds an empty error to the Errors object even if you just call `#[]` on it: ``` [1] pry(main)> u = User.last [2] pry(main)> u.errors.keys => [] [3] pry(main)> u.errors[:username].present? => false [4] pry(main)> u.errors.keys => [:username] ```
Diffstat (limited to 'app/validators')
0 files changed, 0 insertions, 0 deletions