Fix incorrect ActiveRecord call