While you are already here, how about this simplification:

```<div class="control-group{{ ' error' if f.errors }}">```