Look into using a before filter for loading the item when you're inside of the posts route:
```
before '/posts/*' do
  @item = Item.find_by(id: params[:id])
end

```