Refactor AR find conditions