updated from rails 3.2 to 4.1