plataformatec/devise — Issue #1690: current_user and Null Object pattern
Author: jandudulski
Created: 2012-03-02 15:14:25+00:00
State: open

`nil` is ugly and says nothing about object. `current_{model}` for not signed in user sounds like an exemplar of usage for the [Null Object pattern](http://en.wikipedia.org/wiki/Null_Object_pattern) - so why don't use it?

It would be much more usefull if you can write `current_user.name` and forgot about worrying like: `current_user.try(:name)` or even worse:

```
<% unless current_user.nil? %>
<%= current_user.name %>
<% else %>
Guest
<% end %>
```
Any chance to go on the light side of the Force?