ruby on rails - Using Devise and I can't see user id when I'm not logged in -
I am using devise and I have a problem finding a user ID when I If I'm not logged in, how can I direct them to a specific user id?
& lt; H1 & gt; Users & lt; / H1> & Lt; Ul & gt; & Lt;% @ users.each do | User | & Gt%; & Lt; Li & gt; & Lt;% = link_to user.user, user_profile_path% & gt; & Lt; / Li & gt; & Lt;% end% & gt; & Lt; / Ul & gt;
I do not believe Devise provides a route or controller for that handle . You can either add a new route:
-
devise_scopeand overrideregistering controller # - Just create your own custom user controller / route / view - it makes a lot of sense
Comments
Post a Comment