I have a simple time tracker and just trying to write a query that satisfies the following and pulls all records with the following: user_id = 6 AND (is_paused is true OR manual_input_hours is nil).
Based on what I tried to structure as follows
Timerecord.where(user_id: 6).where(Timerecord.where(is_paused: true).or(Timerecord.where.not(manual_input_hours: 0)))
but it doesnt work, getting the following error: Unsupported argument type: #Timerecord::ActiveRecord_Relation:0x000056546f549358 (Timerecord::ActiveRecord_Relation) (ArgumentError)