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

我需要在值之前进行 if 检查,因此除非客户登录,否则它不会通过。我知道 if 是 if logged_in?,但我的语法不正确。

4

1 回答 1

3
<% if @customer.logged_in? %>
<%= form.text_field :email, :value => @customer.email_primary  %>
<% end %>
于 2012-05-23T04:58:21.110 回答