Like the title says, I am using devise. I want to navigate to /users/1 or whatever the current_users path is. When I try link_to(current_user.name, user_path) I just get an error.
undefined local variable or method `user’ for #<#:0x00000101d2dfc8>
Am I not using the right path? Do I need to route it or something?
Also, this goes with the first, how would i navigate to a different users show page(not the current user)
I am not familiar with devise, but I’d be surprised if devise differed from Rails conventions. You need to pass in the user to the route helper:
link_to(current_user.name, user_path(current_user))