updating for rails 4