fix #1920
Merge pull request #1921 from YusiFan/rails4_new

fix #1920