attempt at rails 4 compatability