switch from rails 4 syntax to rails 3