Im trying to insert an avatar image in my _header in the navigation.
When i try i receive this error.
I receive this error.
undefined method `avatar' for nil:NilClass
It is relation to this code on my _header view.
<%= image_tag @user.avatar.url(:large) %>
How do i get the avatar to show?
Aucun commentaire:
Enregistrer un commentaire