I know this is super basic, but I need some help.
In my view, which displays a form, if a field is nil or if there are
errors when the form is submitted, display “A”, otherwise, display “B”.
I can’t figure out how to test for condition 1 OR 2. Instead the code
always executes “A”.
Sample code looks like this:
<% if model.field.nil? or model.errors %>
<%= A %>
<% else %>
<%= B %>
<% end %>