How would I write this correctly?
Request.pending.where(.....) ## Request.pending = request.state_id in (1..3)
where these are the conditions:
approver1_id = current_user and state_id = 1
or
approver2_id = current_user and state_id = 2
or
approver3_id = current_user and state_id = 3
It would be really nice if I could put these conditions in the model for use in other controllers/views, too, because I will use these conditions quite often throughout the app.