Replaced deprecated methods such as find(:all), find(:first), finds with conditions, and the :joins.