I have a problem. I want to display a different select box wether the
current user is an admin or an user.
So I thought I could do this in my view where my form is displayed :
<%= f.label(:role_id, 'Role:') %> <% if (current_user.admin?) then collection_select(:user, :role_id, Role.find(:all, :order => "name desc"), :id, :name) else # Here I would code an another collection_select end %>
But It doesn’t work. Nothing is displayed!
Could you help me?