nevermind. I see how it works. If env['warden'].user is nil, then the whole statement is nil which points you to the else. if env['warden'].user is not nil, then the if statement is true and current_user gets assigned to warden user.
I have the same question. It doesn't validate if I use "==", which I don't understand
Hey Chris -
You mentioned that User.create without the ! will allow an attempt to save to the db to fail silently if the record already exists, but isn't that only true if you've created a uniqueness constraint on the User model? That's the only way I could make it work. Using postgres.