fixing compatible with rails version >= 3.2.9 #38