Changes for rails 4