The pull request with all the code.

Better yet, create a scope on the Friendship model:

``` ruby
scope :current, -> { where(pending: false) }
scope :pending, -> { where(pending: true) }
```

Then just use it like:

``` ruby
current_user.friendships.pending
```