fixes #5129 - Rails 3.2.8 causing error creating hostgroups

Refer to http://projects.theforeman.org/issues/5129 for full details.

The fix for this one is similar to a fix previously applied with pulll request https://github.com/theforeman/foreman/pull/1339