added rails 4 support