I have a user model with a column superuser:boolean. I also using a navigationbar where I want to to have three different views according to those conditions:
- When someone is not signed in
- When someone is signed in as a user
When someone is signed is as a user and the boolean value for superuser is true
<% if (user_signed_in? && user.super_user?) %> <% elsif (user_signed_in?) %> <% else %>
I am getting the error: "undefined local variable or method `user'"
How can I check if the column super_user of an user is true or false?