3 ms·
I disagree. Generally you will have sections of your app that are only for logged in users, so your ACL logic in your controller handily takes care of that, wh
by 3pt14159 12y ago
I disagree.
Generally you will have sections of your app that are only for logged in users, so your ACL logic in your controller handily takes care of that, while still giving you the convenience of being able to call current_user and know that you actually have a user, while still being able to say things like `if current_user` where you need it.
I do like your render partial example, but in most cases you will want to be doing something like showing a like button if the user is signed in, in which case you can do:
<%= render partial: current_user %>
And if the current_user is nil the partial will just be skipped.