compatability for < rails 4