cleanup for rails 4