Fixed rails 4 deprecation warnings in groups

Fixed rails 4 deprecation warnings in groups