belongs_to comparison method has wrong handling of nils
Reported by Betelgeuse | August 5th, 2010 @ 11:16 AM | in Hobo 1.3 (Rails 3)
(rdb:1) p acting_user.new_record?
true
(rdb:1) p user_id
nil
(rdb:1) p user_is?(acting_user)
true
When user is nil it should only return true when compared against nil.
Comments and changes to this ticket
-
Matt Jones September 14th, 2011 @ 11:08 PM
- State changed from new to open
- Milestone set to Hobo 1.3 (Rails 3)
- Milestone order changed from 197870 to 0
-
Matt Jones September 21st, 2011 @ 09:48 PM
(from [abb2120e88144056476022ec68c1e93205e04779]) [#777] handle new records and nils correctly in belongs_to test methods https://github.com/tablatom/hobo/commit/abb2120e88144056476022ec68c...
-
Matt Jones September 21st, 2011 @ 09:49 PM
- State changed from open to resolved
This is fixed now. I also fixed the (admittedly rare) case where the
:primary_key
option is used in thebelongs_to
.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป