How can I use && in if in Ruby on Rails?
Posted
by Angela
on Stack Overflow
See other posts from Stack Overflow
or by Angela
Published on 2010-05-29T16:05:03Z
Indexed on
2010/05/29
16:12 UTC
Read the original article
Hit count: 137
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 :(
© Stack Overflow or respective owner