make some changes for rails 4.1