Re:10 Most Common Rails Mistakes
by taylorfausak on Tuesday June 03, 2014 @12:25PM
(#7841132)
I would much rather have it return a null object instead of nil. You could make it better by adding a #guest? method to your User class.
Although I don't like how the example given returns an OpenStruct instead of a NullUser, for instance.
[ Parent
| on HN ]
There are no comments on this comment yet.