Fix deprecated db lookup in edge rails