I know its really weird but it doesnt work with if current_user && current_user.admin?

It only works as <% if current_user && current_user.admin = true %>

I don't understand it myself.