How do I use greater than together with "or" condition in activerecord? Here is what I am trying to do:
@contract_dues_now = ContractDue.where(:status => ['Unpaid', 'Partially Paid']).
where(due_date: Date.today || ContractDue.arel_table[:due_date].gt(Date.today)).
group(:contract_id).order(:due_date)
It doesnt seems correct to me as I this query result didnt output the OR statement like it suppose to: