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:

  1. devise_scope and override registering controller #
  2. Just create your own custom user controller / route / view - it makes a lot of sense

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -