removing deprecated ActiveRecord syntax