I'm trying to respect the Ruby principle of keeping my code dry; however, in my conditional, I have different constants set to different days. But that's the only thing different. They're pretty much the same code minus the evaluation of days from_now.if term_type == TERM_MONTH  subscription.suspended_at && subscription.suspended_at < MONTHLY_WARNING_1.from_now && suspended_email_1_sent_at.nil? && subscription.suspended_at >= Date.today && is_system == true && paid_at.nil?else   subscription.suspended_at && subscription.suspended_at < ANNUAL_WARNING_1.from_now && suspended_email_1_sent_at.nil? && subscription.suspended_at >= Date.today && is_system == true && paid_at.nil?endI tried using the ternary operator; however, it didn't produce the results I was expecting as it was only setting the days based on term_type yet not sending the mail based on it. days = term_type == TERM_MONTH ? MONTHLY_WARNING_1 : ANNUAL_WARNING_1subscription.suspended_at && subscription.suspended_at < days.from_now && suspended_email_1_sent_at.nil? && subscription.suspended_at >= Date.today && is_system == true && paid_at.nil?Should I stick with the if block?
Checking days from now
ruby;ruby on rails