Rather than sorting the list in the view, you'll want to apply an order to the call that sets `@posts` in the controller, like so:

```ruby
@posts = Post.order('created_at DESC').all
```

The database can always handle sorting lists of objects faster than Ruby trying to do it when rendering a view. Databases are built for sorting lists, so it's best to leave the tough stuff for them.