• Douwe Maan's avatar
    Merge branch 'rs-fix-user-namespace_uniq' into 'master' · acd98810
    Douwe Maan authored
    Properly check for a pre-existing error in `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]
    ```
    
    See merge request !3017
    acd98810
user.rb 25 KB