views:

52

answers:

2

I tried the following && conditional for my if statement and I get a "bad range" error:

<% if (from_today(contact, call.days) == 0..7) && (show_status(contact, call) == 'no status') %>

Why and how can I fix it? The only other way I could do it was to have a second nested if statement and break it apart...not pretty :(

+1  A: 

Try putting the 0..7 in parentheses. The &&is not your problem here.

x1a4
+1  A: 
<% if (from_today(contact, call.days) == (0..7) && show_status(contact, call) == 'no status') %>
Dolph