Can't quite figure this one out. I have a table like this

```
user_id | time       |
----------------------
1       | 10         |
1       | 11         |
1       | 12         |
2       | 13         |
3       | 14         |

```

There is more to it than that and `time` is a datetime field, but that information should be irrelevant. I'd like to only pull the most recent record per user. So my result set would look like

```
user_id | time       |
----------------------
1       | 12         |
2       | 13         |
3       | 14         |

```

How would I do this using the Rails ActiveRecord interface? I'm assuming it has to do with GROUP BY, but I've never had a good grasp on those queries.