The pull request with all the code.

The above two lines might be considered too much logic for the controller... try getting into the habit of putting this type of logic into the model... for instance, create a method in your user model like this:
``` ruby
def current_friendships
  friendships.where(pending: false)
end
```

and

``` ruby
def pending_friendships
  friendships.where(pending: true)
end
```