Add `active_when` helper
We have the following pattern all over the codebase in views:
%li{ class: (klass == Gitlab::GitLogger ? 'active' : '') }
It'd be awesome if we could just do this, for example:
%li{ class: active_when(klass == Gitlab::GitLogger) }
The implementation couldn't be simpler:
def active_when(condition)
'active' if condition
end