Updates for rails 4