If the check in rails forms a tag

<%= form.text_field :email, :value => @customer.email_primary  %>

I need to put an if check before the value so that it does not pass if the client is not logged in. I know that if is, if logged_in?, but I cannot get my syntax correctly.

+3
source share
1 answer
<% if @customer.logged_in? %>
<%= form.text_field :email, :value => @customer.email_primary  %>
<% end %>
+3
source

All Articles