allow rails 3 or 4