This is the perfect opportunity for an [active_record scope](http://guides.rubyonrails.org/active_record_querying.html#scopes) on Relationship so you could call Relationship.unconfirmed_requests_for(user_id)

WHich you could expose as `user.unconfirmed_requests` so you don't have to do these ifs in the view.