I have the following code to disable a text_field
when a user is not an admin and it is working fine:
<div class="form-group">
<%= f.label :nome, "Genero" %>
<%= f.text_field :nome, class: "form-control", disabled: true if not is_admin? %>
</div>
But when a user is an admin the text_field
just disappears. Does anyone know why this is happening and what I have to do?
disabled: !is_admin?
?