Rails 4 fixes
Get rid of deprication warnings