Fixes several deprecation warnings
Fixes Model.find() with rails4