When I m trying to access current_user in partial file it will contains nil value.
I used devise gem for login process. I also used public_activity gem for generating notification.
I have notification controller as below.
def index
@activities = PublicActivity::Activity.all
end
In views/notifications/index.html.erb
<%= render @activities %>
Now in views/public_activity/commontator_comment/_create.html.erb
in this partial I want to access current_user but it contains nil value.
I didn't understand what was the problem.
please help me. thanks in advance.
Aucun commentaire:
Enregistrer un commentaire